hinge_loss
- sklearn.metrics.hinge_loss(y_true, pred_decision, *, labels=None, sample_weight=None)
Average hinge loss (non-regularized).
In binary class case, assuming labels in
y_trueare encoded with +1 and -1, when a prediction mistake is made,is always negative (since the signs are opposite), implying is always greater than 1. The cumulated hinge loss is therefore an upper bound of the number of mistakes made by the classifier.