rules/sklearn/make-scorer-loss-direction.md

sklearn.metrics.make_scorer defaults to greater_is_better=True. Wrapping a loss or error function without greater_is_better=False causes GridSearchCV and RandomizedSearchCV to maximize the loss and pick the worst hyperparameters (on an asymmetric penalty, omitting greater_is_better=False picked alpha=10000.0 with loss 6.251 instead of alpha=1.0 with loss 1.204).

diff
1-scorer = make_scorer(asymmetric_loss)
2+scorer = make_scorer(asymmetric_loss, greater_is_better=False)

What the rule reports

Calls to make_scorer wrapping a scikit-learn, Nixtla, or custom *_loss / *_error / *_deviance function without an explicit greater_is_better= argument.

How to fix it

Pass greater_is_better=False for losses and errors (or greater_is_better=True explicitly if the wrapped function already returns a negated utility).