SharpLearning
SharpLearning copied to clipboard
Sample weight for XGBoost
In Python XGBoost one can provide weights for each row of the data, see http://xgboost.readthedocs.io/en/latest/python/python_api.html#xgboost.XGBClassifier.fit. I tried to look for a way to specify such weights in SharpLearning, but could not find it. Is this possible?
Hi @petterton ,
Currently there is no support for providing sample weights. I have a few tasks for adding this to all the learners, however, I have not completed these yet.
I might add it to the XGBoost learners as a starting point, without adding the option to the general learning interfaces. I will see if I can fit it in during the coming weeks.
Best regards Mads
@petterton, I was trying add sample weight support for the XGBoost learners today. However, it seems that the DMatrix implementation in XGBoost.Net, which I am using to interface with the native xgboost lib, does not support setting the sample weights yet. This makes things slightly more complicated, so adding this will take more time, and depends on when the guys at XGBoost.Net have time to add this. I have added an issue for it: https://github.com/PicNet/XGBoost.Net/issues/26
Thanks for your efforts @mdabros! I will follow developments on the issue at XGBoost.Net.