Skip to content

Glossary: ML Beyond the Basics

Class weight

Also written: class_weight, class weights, scale_pos_weight

A multiplier that makes mistakes on one class count more during training. `class_weight="balanced"` makes the rare cancelers count as much in total as the common stayers, but it inflates the predicted probabilities; LightGBM and XGBoost also offer `scale_pos_weight`, a multiplier for the positive class.

Where the book teaches it

Related terms

ImbalancedResampling