def test_cv_multiplemetrics_requires_refit_metric():
X, y = make_classification(random_state=0)
param_grid = {'max_depth': [1, 5]}
a = dcv.GridSearchCV(RandomForestClassifier(), param_grid, refit=True,
scoring={'score1': 'accuracy', 'score2': 'accuracy'})
with pytest.raises(ValueError):
a.fit(X, y)
评论列表
文章目录