I trained GMM model using 2 classes. And I also tested some sample data from trained GMM model. Finally, I want to get a probability for each class's gmm.
I used sklearn GaussianMixture function named predict_proba. But it shows in array. How can I get it in percentage?
for i in range(len(models)):
gmm = models[i] #checking with each model one by one
scores = np.array(gmm.score(vector))
a=gmm.predict_proba(vector)
print a.shape
log_likelihood[i] = scores.sum()
shape of "a" is (1189L,2L) and data shows like this.
[[6.21130685e-06 9.99993789e-01]
[1.50996162e-15 1.00000000e+00]
[4.79883191e-14 1.00000000e+00]
...
[9.03135413e-08 9.99999910e-01]
[6.83288657e-12 1.00000000e+00]
[2.66804391e-08 9.99999973e-01]]
[[0.04394473 0.95605527]
[0.56844297 0.43155703]
[0.37858995 0.62141005]
...
[0.06809051 0.93190949]
[0.03412009 0.96587991]
[0.00584213 0.99415787]]