watex.models.get_scorers#
- watex.models.get_scorers(*, scorer=None, check_scorer=False, error='ignore')[source]#
Fetch the list of available metrics from scikit-learn or verify whether the scorer exist in that list of metrics. This is prior necessary before the model evaluation.
- Parameters
scorer – str, Must be an metrics for model evaluation. Refer to
sklearn.metrics
- :param check_scorer:bool, default=False
Returns bool if
Truewhether the scorer exists in the list of the metrics for the model evaluation. Note that scorer`can not be ``None` if check_scorer is set toTrue.
- Parameters
error – str, [‘raise’, ‘ignore’] raise a ValueError if scorer not found in the list of metrics and check_scorer `is ``True`.
- Returns
- scorers: bool, tuple
Trueif scorer is in the list of metrics provided that ` scorer` is notNone, or the tuple of scikit-metrics.sklearn.metrics