我正在尝试hyperband
在XGBoost
模型上执行,如下所示,但我收到此错误消息:
AttributeError: 'HyperbandSearchCV' object has no attribute '_get_param_iterator'
我用来运行的代码hyperband
是:
import xgboost as xgb
hb_xgb_model = xgb.XGBClassifier()
xgb_hb_param_dict = {'max_depth' : np.arange(3, 501),
'learning_rate' : np.arange(0.001, 0.1),
'n_estimators' : np.arange(50, 501),
'objective' : ['binary:logistic']
}
import hyperband
from hyperband import HyperbandSearchCV
xgb_search = HyperbandSearchCV(hb_xgb_model, xgb_hb_param_dict, cv=3,
verbose = 1,
max_iter=200,min_iter=50)
xgb_search.fit(x_train,y_train)