RayXGBForecast

ray XGBoost 预测器

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

import xgboost as xgb
from xgboost_ray import RayXGBRegressor
class RayXGBForecast(RayXGBRegressor):
    @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