code: def test_em_loglike6():
      # Test that the likelihood of shifted data is lower
      # than the likelihood of non-shifted data
      dim, k, n = 1, 1, 100
      offset = 3.0
      x = nr.randn(n, dim)
      y = offset + nr.randn(n, dim)
      lgmm = GMM(k, dim)
      lgmm.initialize(x)
      lgmm.estimate(x)
      ll1 = lgmm.average_log_like(x)
      ll2 = lgmm.average_log_like(y)
      assert ll2 < ll1
  
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 7 for calling a global function with example usage: test_em_loglike6() without return types