from sklearn.mixture import GaussianMixture
gmm = GaussianMixture(
n_components = 8,
n_iter = 200,
covariance_type='diag',
n_init = 3
)
You need to give max_iter
for number of EM iterations, instead of n_iter
. n_iter
is not valid parameter for GussianMixture model.
This should work:
from sklearn.mixture import GaussianMixture
gmm = GaussianMixture(
n_components = 8,
max_iter = 200,
covariance_type='diag',
n_init = 3
)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.