Class Weights for Imbalanced Data
Stop the majority class from dominating.
When One Class Dominates
If 95 percent of your samples are one class, the model can score high by always guessing it. That is the class imbalance trap. ⚖️
Why Accuracy Lies Here
A lazy model that ignores the rare class still looks 95 percent accurate. So accuracy hides total failure on the minority you actually care about.
All lessons in this course
- MSE & MAE for Regression
- Binary Cross-Entropy with Logits
- Cross-Entropy for Multiclass
- Class Weights for Imbalanced Data