Sample_weight behaviour

Hi there!

I’m using xgboost for a regression problem, and the use of the sample_weight parameter is unclear for me, I couldn’t find much information about the meaning of these weights, and it does not work as I was expecting.

I’m trying to create a model to fit the following time series:

The pattern of the time series has changed, while the range of inputs has not. I was expecting that using the sample_weight parameter to to set a low weight (zero) to the data before the pattern change (about June 2020) and a high weight (ten) to the data after this pattern change would somehow ignore the data before June 2020 and hence lead to predictions in the range of the period June 2020 - Now. But the resulting predictions do not seem to ignore the data that has a weight=0, so in the predictions there are predicted values higher than the maximum registered values since June 2020.

Any help you can provide will be appreciated.

Thanks in advance!