What are undersampling and oversampling and why do we need them?

What are undersampling and oversampling and why do we need them?

Random oversampling duplicates examples from the minority class in the training dataset and can result in overfitting for some models. Random undersampling deletes examples from the majority class and can result in losing information invaluable to a model.

Should I use oversampling or undersampling?

Oversampling methods duplicate or create new synthetic examples in the minority class, whereas undersampling methods delete or merge examples in the majority class. Both types of resampling can be effective when used in isolation, although can be more effective when both types of methods are used together.

When to use oversampling and undersampling in data analysis?

Undersampling is employed much less frequently. Overabundance of already collected data became an issue only in the “Big Data” era, and the reasons to use undersampling are mainly practical and related to resource costs.

Which is better undersampling or oversampling the minority class?

Undersampling the majority class. Oversampling the minority class. Building a classifier using the data as it is, would in most cases give us a prediction model that always returns the majority class. The classifier would be biased.

Which is the most common technique for over sampling?

The most common technique is known as SMOTE: Synthetic Minority Over-sampling Technique. To illustrate how this technique works consider some training data which has s samples, and f features in the feature space of the data. Note that these features, for simplicity, are continuous. As an example, consider a dataset of birds for classification.

How is random undersampling used in imbalanced learning?

Random undersampling involves randomly selecting examples from the majority class and deleting them from the training dataset. In the random under-sampling, the majority class instances are discarded at random until a more balanced distribution is reached. — Page 45, Imbalanced Learning: Foundations, Algorithms, and Applications, 2013