# Class Weighting

> Source: https://sukruyusufkaya.com/en/glossary/class-weighting
> Updated: 2026-05-13T20:02:19.984Z
> Type: glossary
> Category: veri-bilimi-ve-veri-yonetimi
**TLDR:** An approach that rebalances model learning by increasing the error cost of underrepresented classes.

<p>Class weighting addresses imbalance at the loss-function level without physically modifying the dataset. Errors made on minority-class examples are made more costly, encouraging the model to pay more attention to those classes. This is especially useful in large datasets and in cases where the original class distribution should be preserved. However, if the weights are chosen arbitrarily, the model may overreact. Class weighting represents an intervention at the objective-function level rather than at the data level.</p>