Issue
タイトルのとおり。fit を実行すると以下の warning が出る。
regressor = XGBRegressor(tree_method='gpu_hist', random_state=0)
regressor.fit(X_train, y_train)
[16:10:12] WARNING: /workspace/src/objective/regression_obj.cu:152: reg:linear is now deprecated in favor of reg:squarederror.
XGBRegressor(base_score=0.5, booster='gbtree', colsample_bylevel=1,
colsample_bynode=1, colsample_bytree=1, gamma=0,
importance_type='gain', learning_rate=0.1, max_delta_step=0,
max_depth=3, min_child_weight=1, missing=None, n_estimators=100,
n_jobs=1, nthread=None, objective='reg:linear', random_state=0,
reg_alpha=0, reg_lambda=1, scale_pos_weight=1, seed=None,
silent=None, subsample=1, tree_method='gpu_hist', verbosity=1)
GridSearchCV しようものなら延々出続けるのでうざい。
環境
Google Colab
解決方法
objective='reg:squarederror'
を指定する。
regressor = XGBRegressor(tree_method='gpu_hist', random_state=0, objective='reg:squarederror')
regressor.fit(X_train, y_train)
XGBRegressor(base_score=0.5, booster='gbtree', colsample_bylevel=1,
colsample_bynode=1, colsample_bytree=1, gamma=0,
importance_type='gain', learning_rate=0.1, max_delta_step=0,
max_depth=3, min_child_weight=1, missing=None, n_estimators=100,
n_jobs=1, nthread=None, objective='reg:squarederror',
random_state=0, reg_alpha=0, reg_lambda=1, scale_pos_weight=1,
seed=None, silent=None, subsample=1, tree_method='gpu_hist',
verbosity=1)
以上