<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Bugzy on Medium]]></title>
        <description><![CDATA[Stories by Bugzy on Medium]]></description>
        <link>https://medium.com/@ziad.seng?source=rss-1325adae15a3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ZqxzsTVk02qfJX8L0ppeRw.jpeg</url>
            <title>Stories by Bugzy on Medium</title>
            <link>https://medium.com/@ziad.seng?source=rss-1325adae15a3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 12:59:43 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ziad.seng/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[SMOTE (Synthetic Minority Over-sampling Technique)]]></title>
            <link>https://medium.com/@ziad.seng/smote-synthetic-minority-over-sampling-technique-3eb26ddd7aec?source=rss-1325adae15a3------2</link>
            <guid isPermaLink="false">https://medium.com/p/3eb26ddd7aec</guid>
            <category><![CDATA[imbalanced-data]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-preprocessing]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Bugzy]]></dc:creator>
            <pubDate>Tue, 27 Aug 2024 11:33:09 GMT</pubDate>
            <atom:updated>2024-08-27T11:54:56.928Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/656/0*wa1IhfjrmXiY_zNJ" /><figcaption>src:<a href="https://www.analyticsvidhya.com/blog/2020/10/overcoming-class-imbalance-using-smote-techniques/">https://www.analyticsvidhya.com/blog/2020/10/overcoming-class-imbalance-using-smote-techniques/</a></figcaption></figure><p>In real-world applications, datasets are often imbalanced, where the majority class significantly outweighs the minority class. Most machine learning models tend to overlook the minority class, leading to biased predictions. A common approach to address this issue is to increase the number of samples in the training dataset by duplicating records from the minority class. However, this method does not add any new information to the data.</p><p>A more effective technique is SMOTE, which generates synthetic data based on the existing records. SMOTE improves upon simple duplication by creating new, synthetic examples rather than just copying existing ones.</p><p><strong>How SMOTE Works:</strong></p><p>SMOTE works by selecting examples from the minority class that are close to each other in the feature space. It then draws a line between them and creates a new sample point along that line. Specifically, SMOTE:</p><p><strong>1. Random Selection:</strong> A minority class instance is randomly selected.</p><p><strong>2. Finding Neighbors:</strong> The algorithm identifies the k-nearest neighbors (with k usually set to 5) of this selected instance within the minority class.</p><p><strong>3. Selecting a Neighbor:</strong> One of these k-nearest neighbors is then randomly chosen.</p><p><strong>4. Generating a Synthetic Example:</strong></p><ul><li>A synthetic example is generated by interpolating between the selected instance and its chosen neighbor. This is done by taking the difference between the feature vectors of the two instances (let’s call them a and b).</li><li>A random number λ is generated, where 0 ≤ λ ≤ 1.</li><li>The synthetic instance s is then created using the formula:</li><li>s=a+λ×(b−a)s = a + λ × (b — a)s=a+λ×(b−a)</li><li>Here, the synthetic instance s is a point on the line segment connecting a and b, where λ determines how far along the line segment the new point is placed.</li></ul><p>This interpolation creates new synthetic samples that lie between existing examples in the minority class, effectively enriching the dataset with more representative examples.</p><h4>SMOTE with Selective Synthetic Sample Generation</h4><p>An extension of SMOTE involves selectively generating synthetic samples for minority class instances that are more likely to be misclassified, such as those on the borderline between classes. For example, instances near the decision boundary are more prone to misclassification and are thus more critical for improving model performance.</p><p>By focusing on these difficult cases, this method provides more resolution where it is most needed, enhancing the overall effectiveness of the classification model.</p><h4>Balancing the Dataset: Combining SMOTE with Majority Class Reduction</h4><p>While SMOTE increases the number of minority class instances, it’s often recommended to also reduce the number of majority class samples before adding the synthetic samples. This combination helps maintain a balanced dataset, preventing the model from being overwhelmed by the majority class.</p><h4>Conclusion</h4><p>SMOTE is a powerful technique for addressing the challenges of imbalanced datasets by generating synthetic samples for the minority class. By interpolating between existing minority class examples, SMOTE enriches the dataset with diverse, representative samples that help machine learning models perform better on minority class predictions. When combined with other techniques, such as majority class reduction, SMOTE can significantly improve model performance on imbalanced datasets.</p><p>Whether you’re dealing with fraud detection, medical diagnosis, or any other domain with imbalanced data, SMOTE offers a valuable tool for creating more balanced and effective machine learning models.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3eb26ddd7aec" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>