Closed ravi0912 closed 6 years ago
I just checked your code with random integer test data, and it works. Singular matrices can arise, depending on your data, if one or multiple components have their covariances go to zero. This is more of a concern for integer data, so I suggest that you add the parameter w=1
(or some other suitable number) to provide a lower bound on the diagonal elements of the covariance matrix.
Thanks, it is really helpful.. Solved my problem.
Hi, I'm using this library and restricting the mean update. I had initialized the gmm.mean, amp and covar. My data is 1d and integer. I'm trying to fit gmm curve in this data. This is the error I'm getting : LinAlgError: Singular matrix
gmm = pygmmis.GMM(K=3, D=1)
# K components, D dimensionsgmm.amp = np.array([0.33,0.33,0.33])
gmm.mean = np.array([[7],[14],[30]])
gmm.covar = np.array([[[2]],[[3]],[[5]]])
logL, U = pygmmis.fit(gmm, t_data,init_method='none',frozen={"amp":[],"mean":[0,1,2],"covar":[]})