code: def test_sofm_custom_parameter_reduction(self):
      X = 4 * np.ones((1, 2))
      default_params = dict(
          n_inputs=2,
          n_outputs=3,
          weight=np.ones((2, 3)),
          std=1,
          step=0.1,
          learning_radius=1,
          reduce_radius_after=None,
          reduce_step_after=None,
          reduce_std_after=None,
      )
  
      sofm_1 = algorithms.SOFM(**default_params)
      sofm_1.train(X, epochs=4)
      dist_1 = np.linalg.norm(sofm_1.weight.T - X)
  
      def on_epoch_end_update_radius(network):
          if network.last_epoch % 2 == 0:
              network.learning_radius = 0
          else:
              network.learning_radius = 1
  
      def on_epoch_end_update_step(network):
          network.step = 0.1 / network.last_epoch
  
      def on_epoch_end_update_std(network):
          network.std = 1.0 / network.last_epoch
  
      testcases = {
          "learning_radius": on_epoch_end_update_radius,
          "step": on_epoch_end_update_step,
          "std": on_epoch_end_update_std,
      }
  
      for testcase_name, on_epoch_end in testcases.items():
          sofm_2 = algorithms.SOFM(
              signals=on_epoch_end, **default_params
          )
          sofm_2.train(X, epochs=4)
          dist_2 = np.linalg.norm(sofm_2.weight.T - X)
  
          self.assertLess(
              dist_1,
              dist_2,
              msg="Test case name: {}".format(testcase_name),
          )
  
imports: import math
  import numpy
  from neupy import algorithms
  from neupy.exceptions import WeightInitializationError
  from neupy.algorithms.competitive import sofm
  from neupy.algorithms.competitive.neighbours import gaussian_df
  from base import BaseTestCase
label_desc: Use image node_id 4 for calling the SOFMParameterReductionTestCase obj's underlying member method code with example usage: obj.test_sofm_custom_parameter_reduction() without return types