code: def test_lvq_training_exceptions(self):
      lvqnet = algorithms.LVQ(n_inputs=2, n_subclasses=4, n_classes=2)
  
      with self.assertRaises(NotTrained):
          lvqnet.predict(np.array([1, 2]))
  
      with self.assertRaises(ValueError):
          X_train = np.array(
              [
                  [1, 2],
                  [3, 4],
                  [4, 5],
              ]
          )
          y_train = np.array([0, 1, 0])
          # len(X_train) <= n_subclasses
          lvqnet.train(X_train, y_train)
  
      with self.assertRaises(ValueError):
          X_train = np.array(
              [
                  [1, 2],
                  [3, 4],
                  [5, 6],
                  [7, 8],
                  [9, 10],
              ]
          )
          y_train = np.array([0, 0, 0, 0, 1])
          # there are should be 3 or more samples for
          # class 1, got only 1
          lvqnet.train(X_train, y_train)
  
      with self.assertRaises(ValueError):
          X_train = np.array(
              [
                  [1, 2],
                  [3, 4],
                  [4, 5],
                  [5, 6],
                  [67, 8],
              ]
          )
          y_train = np.array([0, 1, 0, 1, 2])
          # 3 unique classes instead of 2 expected
          lvqnet.train(X_train, y_train)
  
imports: from functools import partial
  import numpy
  from sklearn import datasets
  from neupy import algorithms, init
  from neupy.exceptions import NotTrained
  from base import BaseTestCase
  from helpers import compare_networks
label_desc: Use image node_id 3 for calling the LVQTestCase obj's underlying member method code with example usage: obj.test_lvq_training_exceptions() without return types