code: def test_categorical_hinge(self):
      targets = asfloat(
          np.array(
              [
                  [0, 0, 1],
                  [1, 0, 0],
              ]
          )
      )
      predictions = asfloat(
          np.array(
              [
                  [0.1, 0.2, 0.7],
                  [0.0, 0.9, 0.1],
              ]
          )
      )
      expected = np.array([0.5, 1.9]).mean()
  
      actual = objectives.categorical_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 11 for calling the ErrorFuncTestCase obj's underlying member method code with example usage: obj.test_categorical_hinge() without return types