title: Old (sklearn 0.17) GMM, DPGM, VBGMM vs new (sklearn 0.18) GaussianMixture and BayesianGaussianMixture
body: <p>In previous scikit-learn version (0.1.17) I used the following code to automatically determine best Gaussian mixture models and optimize hyperparameters (alpha, covariance type, bic) for unsupervised clustering.</p>
  
  <pre><code># Gaussian Mixture Model 
  try:       
      # Determine the most suitable covariance_type
      lowest_bic = np.infty
      bic = []
      cv_types = ['spherical', 'tied', 'diag', 'full']
      for cv_type in cv_types:
          # Fit a mixture of Gaussians with EM
          gmm = mixture.GMM(n_components=NUMBER_OF_CLUSTERS, covariance_type=cv_type)
          gmm.fit(transformed_features)
          bic.append(gmm.bic(transformed_features))
          if bic[-1] &lt; lowest_bic:
              lowest_bic = bic[-1]
              best_gmm = gmm
              best_covariance_type = cv_type
      gmm = best_gmm
  except Exception, e:       
      print 'Error with GMM estimator. Error: %s' % e 
  
  # Dirichlet Process Gaussian Mixture Model  
  try:
      # Determine the most suitable alpha parameter
      alpha = 2/math.log(len(transformed_features))     
      # Determine the most suitable covariance_type
      lowest_bic = np.infty
      bic = []
      cv_types = ['spherical', 'tied', 'diag', 'full']
      for cv_type in cv_types:
          # Fit a mixture of Gaussians with EM
          dpgmm = mixture.DPGMM(n_components=NUMBER_OF_CLUSTERS, covariance_type=cv_type, alpha = alpha)
          dpgmm.fit(transformed_features)
          bic.append(dpgmm.bic(transformed_features))
          if bic[-1] &lt; lowest_bic:
              lowest_bic = bic[-1]
              best_dpgmm = dpgmm
              best_covariance_type = cv_type        
      dpgmm = best_dpgmm                
  except Exception, e:       
      print 'Error with DPGMM estimator. Error: %s' % e    
  
  # Variational Inference for Gaussian Mixture Model   
  try: 
      # Determine the most suitable alpha parameter 
      alpha = 2/math.log(len(transformed_features))  
      # Determine the most suitable covariance_type
      lowest_bic = np.infty
      bic = []
      cv_types = ['spherical', 'tied', 'diag', 'full']
      for cv_type in cv_types:
          # Fit a mixture of Gaussians with EM
          vbgmm = mixture.VBGMM(n_components=NUMBER_OF_CLUSTERS, covariance_type=cv_type, alpha = alpha)
          vbgmm.fit(transformed_features)
          bic.append(vbgmm.bic(transformed_features))
          if bic[-1] &lt; lowest_bic:
              lowest_bic = bic[-1]
              best_vbgmm = vbgmm
              best_covariance_type = cv_type
      vbgmm = best_vbgmm     
  except Exception, e:       
      print 'Error with VBGMM estimator. Error: %s' % e        
  </code></pre>
  
  <p>How to accomplish same or similar behaviour with new Gaussian Mixture/ Bayesian GAussian Mixture models introduced in scikit-learn 0.1.18?</p>
  
  <p>According to scikit-learn documents, there is no "alpha" parameter anymore, but there is "weight_concentration_prior" parameter instead. Are these the same or not?
  <a href="http://scikit-learn.org/stable/modules/generated/sklearn.mixture.BayesianGaussianMixture.html#sklearn.mixture.BayesianGaussianMixture" rel="nofollow">http://scikit-learn.org/stable/modules/generated/sklearn.mixture.BayesianGaussianMixture.html#sklearn.mixture.BayesianGaussianMixture</a></p>
  
  <blockquote>
    <p>weight_concentration_prior : float | None, optional.
        The dirichlet concentration of each component on the weight distribution (Dirichlet). The higher concentration puts more mass in
    the center and will lead to more components being active, while a
    lower concentration parameter will lead to more mass at the edge of
    the mixture weights simplex. The value of the parameter must be
    greater than 0. If it is None, it’s set to 1. / n_components.</p>
  </blockquote>
  
  <p><a href="http://scikit-learn.org/0.17/modules/generated/sklearn.mixture.VBGMM.html" rel="nofollow">http://scikit-learn.org/0.17/modules/generated/sklearn.mixture.VBGMM.html</a></p>
  
  <blockquote>
    <p>alpha: float, default 1 :
        Real number representing the concentration parameter of the dirichlet distribution. Intuitively, the higher the value of alpha the
    more likely the variational mixture of Gaussians model will use all
    components it can.</p>
  </blockquote>
  
  <p>If those two parameters (alpha and weight_concentration_prior) are the same, does it mean that the formula alpha = 2/math.log(len(transformed_features)) still aplies for the weight_concentration_prior = 2/math.log(len(transformed_features))?</p>