code: def test_em_gmm_heterosc():
      # testing the model in very ellipsoidal data:
      # compute the bic values for several values of k
      # and check that the maximal one is 1 or 2
  
      # generate some data
      dim = 2
      x = nr.randn(100, dim)
      x[:50] += 3
  
      # estimate different GMMs of that data
      maxiter, delta = 100, 1.0e-4
  
      bic = np.zeros(5)
      for k in range(1, 6):
          lgmm = GMM(k, dim)
          lgmm.initialize(x)
          bic[k - 1] = lgmm.estimate(x, maxiter, delta, 0)
  
      assert bic[4] < bic[1]
  
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 13 for calling a global function with example usage: test_em_gmm_heterosc() without return types