import xgboost as xgb
DaskXGB预测
dask XGBoost预测器
xgboost.dask.DaskXGBRegressor
的封装,添加了一个model_
属性,该属性包含拟合后的模型,并在预测步骤中发送到工作节点。
class DaskXGBForecast(xgb.dask.DaskXGBRegressor):
@property
def model_(self):
= self.get_booster().save_raw('ubj')
model_str = xgb.XGBRegressor()
local_model
local_model.load_model(model_str)return local_model
Give us a ⭐ on Github