In the scikit learn Gaussian mixture model we can get mean and covariance by
clf = GaussianMixture(n_components=num_clusters, covariance_type="tied", init_params='kmeans')
for i in range(clf.n_components):
cov=clf.covariances_[i]
mean=clf.means_[i]
But in the case of pomegranate Gaussian Mixture model says no attributes called 'covariances_' and 'means_' Thank you very much for your valuable time.
When you run
covariance_type="tied", the model assumes a common covariance matrix for all components, so the code above does not hold. Ifcovariance_type="tied"then it will be 1 covariance matrix under clf.covariances_ . Refer to help page:With
pomegranateit estimates a covariance matrix for each component, so a good comparison with runningGaussianMixturefrom sklearn withcovariance_type="full"So for component or cluster 0 :
Now using pomegranate:
The parameters can be accessed under
distributions, and you have a list as long as your components. For the first, you dodistributions[0], seconddistributions[1]and so on: