我在 colab 中randomForestClassifier
使用。GridSearchCV
但是,myGridSearchCV
不返回 mean_test_score 并显示它不存在。当我尝试检查clf.cv
结果时,没有 mean_test_score。这适用于 Jupyter 笔记本而不是 Colab,我最近遇到了这个问题。
[Parallel(n_jobs=1)]: Done 120 out of 120 | elapsed: 25.3min finished
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-128-1d8f6c95affb> in <module>()
7 clf.fit(X_tr, y_train)
8
----> 9 train_auc= clf.cv_results_['mean_train_score']
10 cv_auc = clf.cv_results_['mean_test_score']
KeyError: 'mean_train_score'