This is documentation for an old release of Scikit-learn (version 0.20). 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

Parameters:
scoring : str | callable

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

Returns:
scorer : callable

The scorer.