Weighted loss functions


#1

How are weight used in XGBoost? Are they only applied to gradients or are they also used in the eval_metric?


#2

Weights affect both the gradients and hessians and thus affect the optimal split.


#3

Yes, agreed, they affect the optimal split. But are they also used when computing the early stopping metric?

They could theoretically be used for choosing the optimal split but not for the metric used for early stopping. This is what my testing suggests, but I’m not 100% sure.


#4

All my testing to date suggests they are used in the evaluation metrics as well.