There is a method to return means of all the guassian components generated but I couldn't find any to get the standard deviations and the means.

Also, the means do not have any error component associated to them.

from scipy.stats import skewnorm
import matplotlib.pyplot as plt
import numpy as np

numValues = 10000
maxValue = 100
skewness = -5   
data = skewnorm.rvs(a = skewness,loc=maxValue, size=numValues) 

from sklearn.mixture import GaussianMixture
gmm = GaussianMixture(n_components = 1).fit(X=np.expand_dims(data,1))

The following would return the mean of the 1 component:

gmm.means_

array([[99.21111667]])

Now, I would want to get the standard deviation as well as median of the model.

1

There are 1 best solutions below

0
On

There is no median parameter using gmm.

The parameter are the weights, means and covariance. Those information can be retrieve as follows:

gmm.weights_
gmm.means_
gmm.covariances_