ray-project / xgboost_ray

Distributed XGBoost on Ray
Apache License 2.0
143 stars 34 forks source link

Fix issues with objective="multi:softprob" #110

Closed Yard1 closed 3 years ago

Yard1 commented 3 years ago

objective="multi:softprob" returns a 2d array instead of a 1d array during prediction. This caused issues with predict as it expected a 1d array. This PR fixes this, as well as the handling of BATCH sharding mode during prediction (though I think it still fails on training).

The only change to the public API would be that the callback receives a pandas DataFrame instead of a Series, but I don't think it will cause many issues.

A test was added.

Yard1 commented 3 years ago

CC @richardliaw