필터 지우기
필터 지우기

Why gmdistribution.fit gives me different values?

조회 수: 1 (최근 30일)
Hewitt
Hewitt 2015년 3월 6일
댓글: zahra zaeri 2015년 3월 7일
When I fit data to GMM using gmdistribution.fit I get different values of mean , Covariance and weight. How to make it give constant values. Thanks in advance.

답변 (1개)

Adam
Adam 2015년 3월 6일
From the help page (for fitgmdist in R2014b which has replaced gmdistribution.fit):
You can fit a GMM with defined initial values as in the example given:
Mu = [1 1; 2 2; 3 3];
Sigma(:,:,1) = [1 1; 1 2];
Sigma(:,:,2) = 2*[1 1; 1 2];
Sigma(:,:,3) = 3*[1 1; 1 2];
PComponents = [1/2,1/4,1/4];
S = struct('mu',Mu,'Sigma',Sigma,'ComponentProportion',PComponents);
GMModel3 = fitgmdist(X,3,'Start',S);
By default a k-means algorithm is used which includes a random element and is thus not deterministic.
  댓글 수: 3
Adam
Adam 2015년 3월 6일
Please accept the answer if it resolves the problem so people can see the question is answered and does not need further attention.
zahra zaeri
zahra zaeri 2015년 3월 7일
this problem was my question,tnx alot adam!

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Statistics and Machine Learning Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by