From other posts (see Unbalanced multiclass data with XGBoost) and the documentation, scale_pos_weight
in XGBoost appears to balance positive and negative cases, which seems to apply only to classification. However, it also appears to be an option in XGBRegressor (see documentation). Before I dive into the source code, can someone explain what this does for regression?
$\begingroup$
$\endgroup$
1
1 Answer
$\begingroup$
$\endgroup$
1
There are a few unused or deprecated parameters in both XGBClassifier and XGBRegressor, so it might just be a matter of sloppy inheritance/c+p.
A couple of possibilities:
- They copied over the params from Sklearn's GradientBoostedClassifier
- They copied over the params from XGBClassifier
- They inherited the properties from some class that already had those attributes.
There have been some consistency issues for a while now (I faintly recall nthreads
versus n_job
issue.)
-
$\begingroup$ Oh yeah, the only other question I've answered on this StackExchange was about these vestigial variables: datascience.stackexchange.com/questions/33885/… $\endgroup$– Dave LiuCommented Sep 25, 2019 at 17:26
scale_pos_weight
parameter has no effect for regression problems. This example demonstrates this with a suite of differentscale_pos_weight
values with no effect on model skill. $\endgroup$