class_docstr: Epsilon-insensitive hinge loss.
  
  Parameters
  ----------
  eps
class_docstr_tok: ["Epsilon-insensitive","hinge","loss",".","Parameters","--","--","--","--","--","eps"]
code: def gradient(self, y_true, y_pred):
      y_true = y_true * 2 - 1  # [0, 1] -> [-1, 1]
  
      if isinstance(y_true, np.ndarray):
          gradients = np.zeros_like(y_true)
          gradients[y_pred > y_true + self.eps] = 1
          gradients[y_pred + self.eps < y_true] = -1
          return gradients
  
      if y_pred > y_true + self.eps:
          return 1
      elif y_pred + self.eps < y_true:
          return -1
      return 0
  
imports: from __future__ import annotations
  import math
  import numpy
  from scipy import special
  from river import base, utils
  from river.optim.base import Loss
label_desc: Use image node_id 3 for calling the EpsilonInsensitiveHinge obj's underlying member method code with example usage: obj.gradient(y_true, y_pred) and returns: int, gradients, int, unknown