2016-11-14 68 views

回答

0

您是否試過XGBRegressor?看下面的例子:

Xgbm_linear = xgb.XGBRegressor(max_depth=3, learning_rate=0.1, n_estimators=500, 
          silent=True, objective='reg:linear', nthread=-1, gamma=0, 
          min_child_weight=1, max_delta_step=0, subsample=1, 
          colsample_bytree=1, colsample_bylevel=1, reg_alpha=0, 
          reg_lambda=1, scale_pos_weight=1, base_score=0.5, 
          seed=0, missing=None).fit(X_train_matrix, Y_train)