AIExplainer
Machine Learning Intermediate 2 min read

What is imbalanced dataset?

A dataset where the number of examples in each category is significantly different

An imbalanced dataset is a collection of data where one or more categories have a much larger number of examples than others, which can affect the performance of machine learning models

Imagine trying to learn a new language by reading a book that has 100 pages of one topic and only 1 page of another topic - you would likely become very proficient in the first topic but struggle with the second, which is similar to how a model trained on an imbalanced dataset may perform well on the dominant category but poorly on the others

A dataset of images of animals, where there are 1000 images of dogs, 500 images of cats, but only 10 images of birds - this dataset is imbalanced because there are many more examples of dogs and cats than birds

Imbalanced datasets are often encountered in real-world applications such as image classification, sentiment analysis, and medical diagnosis, where one class may have a significantly larger number of instances than others

One common misconception is that imbalanced datasets are always a problem, but in some cases, the imbalance may be representative of the real-world distribution of the data, and the model should be able to handle it

The concept of imbalanced datasets has been recognized as a challenge in machine learning since the early 2000s, with researchers developing various techniques to address the issue, such as oversampling the minority class, undersampling the majority class, and using class weights

class imbalance data imbalance skewed dataset

Three products for different needs — explore what’s relevant to you.