classweighted
Classweighted is a technique in supervised learning used to address class imbalance by assigning different importance to classes during model training. By giving higher weight to underrepresented classes, the method aims to improve the model's performance on those classes without requiring data resampling.
Weights are typically derived from class frequencies. Common schemes include w_c = N / (K * n_c) and w_c
Implementation details vary by framework. In neural networks, a per-class weight vector is passed to loss functions
Considerations and limitations include the fact that weighting alters the optimization objective and can improve minority-class
See also: class imbalance, resampling, focal loss, sample_weight.