1
私はubuntuのAnacondaでPython 3.6.2を使用しています。そして、 "pip install xgboost"を使用してxgboostをインストールしました。また、hereライブラリ)が、両方が動作しないことができ、常に以下の "AttributeError: 'module'オブジェクトには、アナコンダに属性 'XGBClassifier'がありません。
'module' object has no attribute 'XGBClassifier'
"
を示しては、私のコードです:
cv_params = {'max_depth': [3,5,7], 'min_child_weight': [1,3,5]}
ind_params = {'learning_rate': 0.1, 'n_estimators': 1000, 'seed':0, 'subsample': 0.8, 'colsample_bytree': 0.8,
'objective': 'binary:logistic'}
optimized_GBM = GridSearchCV(xgb.XGBClassifier(**ind_params),
cv_params,
scoring = 'accuracy', cv = 5, n_jobs = -1)
これは機能します。この修正の後、カーネルを再起動することを忘れないでください。 – Nib