You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 dimensions gmm.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":[]})
The text was updated successfully, but these errors were encountered:
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.
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":[]})
The text was updated successfully, but these errors were encountered: