In scikit-learn, the GaussianMixture object has the method bic(X) that implements the Bayesian Information Criterion to choose the number of components that better fits the data.
This is an example of usage:
from sklearn import mixture
for n in range(0,10):
gmm = mixture.GaussianMixture(n_components=n, max_iter=1000, covariance_type='diag', n_init=50)
gmm.fit(data)
bic_n = gmm.bic(data)
I am fitting a GMM on a dataset with 600k rows and 7 columns. The BIC values are always negative, e.g. [-2000, -3000, -3300, ..].
In the documentation of the method bic(), it says "The lower the better". In the case of negative values as in my example, is then -3300 the best value, or it refers to the lowest value in absolute terms?