Skip to content

AI Glossary · Concepts

What is Imbalanced Dataset?

Imbalanced Dataset

An imbalanced dataset is one where some categories are far rarer than others, such as 999 legitimate card transactions for every fraudulent one. Models trained on it can score high accuracy while missing nearly all the rare cases that matter.

Also known as: class imbalance, class-imbalanced dataset, imbalanced data, imbalanced classes

· Chain of Thought

Model TrainingAI Evaluation & Reliability

  • 3 sources

Fraud detection is the textbook case. If one transaction in 1,000 is fraud, a model that always answers “not fraud” is 99.9% accurate and completely useless. The same pattern shows up in rare-disease screening, equipment-failure prediction, security alerts and content moderation: the cases a business cares about most are the ones it has fewest examples of.

Two problems follow. During training, the model sees so few rare examples that it barely learns them. During evaluation, accuracy hides the failure. Better yardsticks are precision and recall, the F1 score, or a confusion matrix that shows the rare-class errors directly.

Fixes come in three families. Resample the training set: downsample the common class, or oversample the rare class (SMOTE creates synthetic rare examples). Reweight the loss so mistakes on the rare class cost more. Or move the decision threshold so the model flags more borderline cases, trading more false positives for fewer misses. Keep the test set at the real-world ratio, though, or the scores won’t reflect production. When the rare class is too rare to label at all, the problem often turns into anomaly detection.

Sources