DaskXGB预测

dask XGBoost预测器

xgboost.dask.DaskXGBRegressor的封装,添加了一个model_属性,该属性包含拟合后的模型,并在预测步骤中发送到工作节点。

import xgboost as xgb
class DaskXGBForecast(xgb.dask.DaskXGBRegressor):
    @property
    def model_(self):
        model_str = self.get_booster().save_raw('ubj')
        local_model = xgb.XGBRegressor()
        local_model.load_model(model_str)
        return local_model

Give us a ⭐ on Github