You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
model_selection.cross_val_score explicitly blocks multiple scores despite calling cross_validate underneath the hood. Essentially, we have two identical functions but have manually blocked cross_val_score from accepting multiple scores.
defcross_val_score(estimator, X, y=None, groups=None, scoring=None, cv=None,
n_jobs=1, verbose=0, fit_params=None,
pre_dispatch='2*n_jobs'):
# To ensure multimetric format is not supportedscorer=check_scoring(estimator, scoring=scoring)
cv_results=cross_validate(estimator=estimator, X=X, y=y, groups=groups,
scoring={'score': scorer}, cv=cv,
return_train_score=False,
n_jobs=n_jobs, verbose=verbose,
fit_params=fit_params,
pre_dispatch=pre_dispatch)
returncv_results['test_score']
It creates confusion and duplication of APIs. Open to discussion but can we perhaps consider:
I'd be happy if that error message were extended to refer the user to
cross_validate. I don't understand why you expect cross_val_score to return
a copy result in the cross_validate format though... That format is the
primary difference between them. If the documentation can be clarified,
please do.
Description
model_selection.cross_val_score explicitly blocks multiple scores despite calling cross_validate underneath the hood. Essentially, we have two identical functions but have manually blocked cross_val_score from accepting multiple scores.
It creates confusion and duplication of APIs. Open to discussion but can we perhaps consider:
cross_val_score
,GridSearchCV
et al. to evaluate on multiple metrics #7388 and make cross_val_score accept both single and multiple scores and callable, None?Steps/Code to Reproduce
Expected Results
Actual Results
Versions
Darwin-17.4.0-x86_64-i386-64bit
Python 3.6.4 (default, Mar 22 2018, 13:54:22)
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)]
NumPy 1.14.2
SciPy 1.0.1
Scikit-Learn 0.20.dev0
The text was updated successfully, but these errors were encountered: