Replies: 1 comment
-
The Importance of Absolute Values in Class WeightsThe absolute values of class weights do matter because they directly affect the optimization process of logistic regression. While the relative ratios of weights influence the decision boundary, the absolute values impact the gradient updates and convergence behavior of the model. 1. Why Do Absolute Values of Weights Matter?Impact on the Loss Function Scaling
Regularization & Optimization Effects
Numerical Stability
2. How to Calculate Correct Class Weights Without
|
Beta Was this translation helpful? Give feedback.
-
The question of how to choose absolute values of class weights was never covered in my uni lectures so I thought that only relative values do matter and class_weight={0:1, 1:2, 2:4} is equal to class_weight={0:0.5, 1:1, 2:2}. But you could simply check this is not true. The code below solves the same task in loop with different weights while ratios of every two weights stay the same:
As you could see we get different results.
Beta Was this translation helpful? Give feedback.
All reactions