This is documentation for an old release of Scikit-learn (version 0.24). Try the latest stable release (version 1.6) or development (unstable) versions.

sklearn.metrics.get_scorer

sklearn.metrics.get_scorer(scoring)[source]

Get a scorer from string.

Read more in the User Guide.

Parameters
scoringstr or callable

Scoring method as string. If callable it is returned as is.

Returns
scorercallable

The scorer.