Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/324.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/matlab/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 属性错误:';HyperbandSearchCV';对象没有属性'_获取参数迭代器';_Python_Machine Learning_Data Mining_Xgboost_Xgbclassifier - Fatal编程技术网

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)抱歉给您带来不便。我已经格式化了代码。希望这有帮助。你有没有找到解决办法?