我想将目标保持为“reg:linear”和eval_metric
定制的 RMSE,如下所示:
def customised_rmse(preds, dtrain):
N = len(preds)
preds = np.array(preds)
actual = np.array(dtrain.get_label())
crmse = np.sqrt(np.sum(np.power((preds+1)*1.0/(actual+1) - 1.1, 2))/N)
return "custom-rmse", crmse
当我跑的时候,训练功能如下->
model = xgb.train(param_list, xgb_train, num_rounds, watchlist, None, customised_rmse, early_stopping_rounds=30)
我得到的输出是这个->
[0] train-rmse:15.1904 val-rmse:15.2102 train-custom-rmse:0.607681 val-custom-rmse:0.610993
Multiple eval metrics have been passed: 'val-custom-rmse' will be used for early stopping.
Will train until val-custom-rmse hasn't improved in 30 rounds.
[1] train-rmse:14.4936 val-rmse:14.5103 train-custom-rmse:0.588831 val-custom-rmse:0.589902
等等...
我的问题是,它正在使用“rmse”或“custom-rase”或两者进行优化?我必须做些什么来删除“rmse”,因为它默认带有“reg:linear”?