import xgboost as xgb
from xgboost_ray import RayXGBRegressor
RayXGBForecast
ray XGBoost 预测器
xgboost.ray.RayXGBRegressor
的包装器,它添加了一个 model_
属性,该属性包含拟合的模型,并在预测步骤中发送到工作节点。
class RayXGBForecast(RayXGBRegressor):
@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