Undersampling is a technique used in imbalanced machine learning datasets to address the problem of class imbalance. Class imbalance occurs when one class has significantly fewer samples than the other(s), leading to biased model performance and predictions. Undersampling aims to reduce the number of samples from the majority class to balance the class distribution.
In this technique, samples from the majority class are randomly selected and removed from the dataset until a desired balance between the classes is achieved. The removed samples are discarded, and the remaining dataset is used for training the model.
There are different strategies for performing undersampling:
Random Undersampling: It involves randomly selecting samples from the majority class without any specific criteria. It is a simple and straightforward method, but it may discard useful information and potentially result in the loss of important minority class samples.
Cluster-based Undersampling: This technique involves clustering the majority class samples and then selecting representative samples from each cluster. This technique aims to preserve the diversity of the majority class while reducing its size.
Near Miss Undersampling: It selects samples from the majority class that are close to the minority class samples based on some distance metric. It ensures that the selected majority class samples are similar to the minority class samples in feature space.
Tomek Links: Tomek Links are pairs of samples from different classes that are nearest neighbors of each other. Undersampling using Tomek Links involves removing the majority class samples from these pairs, as they are considered borderline samples and may cause misclassification.
Edited Nearest Neighbors (ENN): ENN is an iterative undersampling technique that removes samples from the majority class if their class label conflicts with the labels of their nearest neighbors. This process is repeated until no more samples are removed.
Undersampling can help in mitigating the issues caused by class imbalance by providing a more balanced training dataset. However, it is important to consider the potential drawbacks of undersampling. By reducing the number of samples from the majority class, undersampling can discard potentially useful information and lead to loss of overall data representation. Undersampling may be more effective when the majority class has a large number of redundant or noisy samples.
It is also worth noting that undersampling is just one approach to handle class imbalance, and other techniques such as oversampling, class weighting, or generating synthetic samples may also be considered. The choice of the appropriate technique depends on the specific problem, dataset characteristics, and the performance requirements of the machine learning task.
SoulPage uses cookies to provide necessary website functionality, improve your experience and analyze our traffic. By using our website, you agree to our cookies policy.
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.