Python 属性错误:';HyperbandSearchCV';对象没有属性'_获取参数迭代器';
我试图在Python 属性错误:';HyperbandSearchCV';对象没有属性'_获取参数迭代器';,python,machine-learning,data-mining,xgboost,xgbclassifier,Python,Machine Learning,Data Mining,Xgboost,Xgbclassifier,我试图在XGBoost模型上执行hyperband,如下所示,但我收到此错误消息: 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(
XGBoost
模型上执行hyperband
,如下所示,但我收到此错误消息:
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)
我已经添加了error.import xgboost的屏幕截图,作为xgb hb_xgb_model=xgb.XGBClassifier()xgb_hb_param_dict={'max_depth':np.arange(3501),'learning_rate':np.arange(0.001,0.1),'n_估计器]:np.arange(50501),'objective':['binary:logistic']从hyperband导入HyperbandSearchCV xgb_search=HyperbandSearchCV(hb_xgb_模型,xgb_hb_参数dict,cv=3,verbose=1,max_iter=200,min_iter=50)xgb_search.fit(x_train,y_train)抱歉给您带来不便。我已经格式化了代码。希望这有帮助。你有没有找到解决办法?