code: def test_linear_weight_init_in_sofm(self):
      sofm = algorithms.SOFM(
          n_inputs=4,
          features_grid=(3, 3),
          weight="init_pca",
      )
  
      X = np.random.random((100, 4))
      self.assertTrue(callable(sofm.weight))
  
      sofm.init_weights(X)
      self.assertFalse(callable(sofm.weight))
      self.assertEqual(sofm.weight.shape, (4, 9))
  
      for row in (0, 3, 6):
          left = sofm.weight[:, row]
          center = sofm.weight[:, row + 1]
          right = sofm.weight[:, row + 2]
  
          self.assertLess(
              np.linalg.norm((left - center) ** 2),
              np.linalg.norm((left - right) ** 2),
          )
  
      for i in range(3):
          top = sofm.weight[:, i]
          center = sofm.weight[:, i + 3]
          bottom = sofm.weight[:, i + 6]
  
          self.assertLess(
              np.linalg.norm((top - center) ** 2),
              np.linalg.norm((top - bottom) ** 2),
          )
  
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 5 for calling the SOFMWeightInitializationTestCase obj's underlying member method code with example usage: obj.test_linear_weight_init_in_sofm() without return types