code: def test_em_gmm_largedim():
      # testing the GMM model in larger dimensions
  
      # generate some data
      dim = 10
      x = nr.randn(100, dim)
      x[:30] += 2
  
      # estimate different GMMs of that data
      maxiter, delta = 100, 1.0e-4
  
      for k in range(2, 3):
          lgmm = GMM(k, dim)
          bgmm = lgmm.initialize_and_estimate(
              x, None, maxiter, delta, ninit=5
          )
  
      z = bgmm.map_label(x)
  
      # define the correct labelling
      u = np.zeros(100)
      u[:30] = 1
  
      # check the correlation between the true labelling
      # and the computed one
      eta = np.absolute(
          np.dot(z - z.mean(), u - u.mean())
          / (np.std(z) * np.std(u) * 100)
      )
      assert eta > 0.3
  
file_path: nipy/nipy/algorithms/clustering/tests/test_gmm.py
imports: import numpy
  from ..gmm import GMM, best_fitting_GMM
label_desc: Use image node_id 12 for calling a global function with example usage: test_em_gmm_largedim() without return types