141k views
3 votes
Which hyperparameter of XGBoost can be used to deal with the imbalance in data?

A. imbalance_factor
B. scale_pos_weight
C. imbalance_correction
D. data_weighting

User Wen W
by
7.6k points

1 Answer

3 votes

Final answer:

The scale_pos_weight hyperparameter can be used to deal with imbalance in data in XGBoost.

Step-by-step explanation:

The correct answer is B. scale_pos_weight.

In XGBoost, the scale_pos_weight hyperparameter is used to deal with imbalanced data. It assigns a higher weight to the minority class samples, which helps in improving the performance of the model on the minority class. By increasing the weight of the minority class, XGBoost ensures that the model focuses more on correctly classifying the minority class.

For example, if the ratio of the majority class to the minority class is 10:1, you can set scale_pos_weight=10 to provide a higher weight to the minority class. This helps in balancing the impact of the classes and leads to better predictions for the minority class.

User Nicolas Jean
by
8.9k points