Does the weight work for the negative samples

I’m training a point-wise model using XGBoost and I have a weights column in the training data. I also set the weight value for negative samples. I wonder if the weight of negative samples is ignored by XGBoost? Does XGBoost only consider the weight values of positive samples?

I assume that you are talking about binary classification with positive and negative samples. If correct, then yes, weights work for all samples.

If you are using the Python interface or the R interface, there’s a weight parameter, putting it into the feature matrix will be treated as a part of the predictor instead of sample weight.