sklearn.metrics.check_scoring
- 
sklearn.metrics.check_scoring(estimator, scoring=None, *, allow_none=False)[source]
- 
Determine scorer from user options. A TypeError will be thrown if the estimator cannot be scored. - Parameters
- 
- 
estimatorestimator object implementing ‘fit’
- 
The object to use to fit the data. 
- 
scoringstr or callable, default=None
- 
A string (see model evaluation documentation) or a scorer callable object / function with signature scorer(estimator, X, y).
- 
allow_nonebool, default=False
- 
If no scoring is specified and the estimator has no score function, we can either return None or raise an exception. 
 
- 
- Returns
- 
- 
scoringcallable
- 
A scorer callable object / function with signature scorer(estimator, X, y).
 
- 
 
    © 2007–2020 The scikit-learn developers
Licensed under the 3-clause BSD License.
    https://scikit-learn.org/0.24/modules/generated/sklearn.metrics.check_scoring.html