Closed 19930323 closed 2 years ago
The weight is used in the objective. It's might just be the linear model not converging well, I can't be sure at the moment.
Please try to remove the regularization term and try again. Also in general tree models might be easier to tune.
XGBoost linear model doesn't support set_weight() function the settings of my model is as follow
and I tried to set weight for each instance using dmatrix.set_weight(weights) weights is a array contains the weight for each data point since it's a listwise loss function that optimizes NDCG, I also use the function set_group()
after running the model, all the metrics are the same so we can't pick up a optimized hyper-parameter, and when we remove set_weight, the model can run as desired.
with gbtree, the function works fine, but with gblinear it's not. I also tried to set the weight to 1.0 for all instance, but it still doesn't work well.