Core
Handling Imbalanced Data
On a 99-to-1 class split, a model that predicts the majority class scores 99% accuracy and catches nothing, which is why accuracy lies on imbalanced data. The fixes are resampling (SMOTE, undersampling), class weights, and threshold moving, judged on PR-AUC and recall-at-precision, not accuracy. The biggest pitfall is resampling before you split.
a free account unlocks the core curriculum tier · no card
Related course lessons
Related concepts
Practise this in questions
Machine Learning & Data ScienceYour model has 0.95 ROC AUC. The customer is unimpressed in production. What does AUC actually tell you? →easy · FreeMachine Learning & Data ScienceThe customer's dataset is 99.5% negatives. Their model shows 99.5% accuracy. Walk me through what you'd do. →medium · FreeML System Design (Product)Design a system to detect bots and inauthentic accounts in real time. →hard · FreeML System Design (Product)Build a fraud-detection model for payments. →hard · FreeMachine Learning & Data ScienceWhat is a confusion matrix, and give a concrete case where accuracy is misleading. →easy · Premium
