Reputation: 1214
I've created a Gaussian Mixture Model in Python with 11 components based on 8-dimensional data (I picked 11 components because that's what minimized the BIC score). I now have a test sample of data (50 samples of 8-dimensional data), and I want to evaluate the probability that each of these 50 samples can be described by this GMM. I have this so far:
from sklearn.mixture import GaussianMixture
gm = GaussianMixture(n_components=11, random_state=0).fit(train_data)
loglike_test = gm.score_samples(test_data)
probs = np.exp(loglike_test)
But these probabilities do not all fall between 0 and 1. I also computed the probabilities for train_data
, and many of the values are much greater than 1 (on the order of 10^3). How can I transform these probabilities to percentages that make sense?
Upvotes: 0
Views: 831