HINGE
HINGE()
Content copied to clipboard
Computes the hinge loss between y_true
and y_pred
.
loss = maximum(1 - y_true * y_pred, 0)
y_true
values are expected to be -1 or 1. If binary (0 or 1) labels are provided we will convert them to -1 or 1.