Closed ae-powell closed 5 months ago
Hi,
I'm not able to reproduce this, could you share and/or upgrade the versions that you've used for xgboost
and xgboost-distribution
?
Sample weights are fully supported after version >= 0.2.6. Note the syntax is to only set them in the fit call:
model = XGBDistribution()
model.fit(X, y, sample_weight=sample_weight)
Thank you. Looks like it was a compatibility issue with scikit-learn
. When upgrading to 1.4.2 I didn't experience the same issues with passing parameters after using .set_fit_request(sample_weight=True)
.
I've found that parameters can go unused when
XGBDistribution
if used in a sklearnPipeline
. For example, this snippet below returns a warning thatsample_weights
are going unused. Hopefully there is a relatively simple explanation or fix for this.This returns the following warning message: