How Can I Know Which Is The Positive Class Value And Negative Class Value For Xgboost?
I am working with an imbalanced dataset where I have a class variable of 2 different values: 0 and 1. The number of '0' values is 1000 and the number of '1' values is 3000. For XGB
Solution 1:
For binary classification imbalanced dataset, always consider positive value to the minority class (class 1) and negative values to the majority class (class 0).
But you have assumed class 0 as minority class & class 1 as majority class.
By default value of scale_pos_weight=1 or > 1
Solution 2:
jartymcfly. Usually, positive = 1 and negative = 0.
scale_pos_weight = len(y[y == 0]) / len(y[y == 1])
Post a Comment for "How Can I Know Which Is The Positive Class Value And Negative Class Value For Xgboost?"