code: def test_binary_hinge(self):
      targets = np.array(
          [
              [-1, 1, 1],
              [-1, -1, 1],
          ]
      )
      predictions = np.array(
          [
              [-0.1, 0.9, 0.5],
              [0.5, -0.5, 1],
          ]
      )
      expected = np.array(
          [
              [0.9, 0.1, 0.5],
              [1.5, 0.5, 0],
          ]
      ).mean()
  
      actual = objectives.binary_hinge(targets, predictions)
      self.assertAlmostEqual(expected, self.eval(actual), places=3)
  
file_path: neupy/tests/algorithms/gd/test_objectives.py
imports: import numpy
  from neupy.utils import asfloat
  from neupy.algorithms.gd import objectives
  from base import BaseTestCase
label_desc: Use image node_id 10 for calling the ErrorFuncTestCase obj's underlying member method code with example usage: obj.test_binary_hinge() without return types