Is it possible to train a model in Xgboost that have multiple continuous outputs (multi regression)? What would be the objective to train such a model?
Thanks in advance for any suggestions
Is it possible to train a model in Xgboost that have multiple continuous outputs (multi regression)? What would be the objective to train such a model?
Thanks in advance for any suggestions
My suggestion is to use sklearn.multioutput.MultiOutputRegressor as a wrapper of
xgb.XGBRegressor
.MultiOutputRegressor
trains one regressor per target and only requires that the regressor implementsfit
andpredict
, which xgboost happens to support.This is probably the easiest way to regress multi-dimension targets using xgboost as you would not need to change any other part of your code (if you were using the
sklearn
API originally).However this method does not leverage any possible relation between targets. But you can try to design a customized objective function to achieve that.