t-Student-Mixture-Models icon indicating copy to clipboard operation
t-Student-Mixture-Models copied to clipboard

problems with restricted covariances

Open maciejskorski opened this issue 4 years ago • 2 comments

I see recurring problems when trying covariances different than "full", that is diag, spherical etc. The code to reproduce

from smm import SMM from sklearn import datasets data = datasets.load_iris() X,y = data.data.astype('float32'), data.target.astype('int32') #X = (X-X.mean(0))/X.std(0) n_classes = len(np.unique(y)) SMM(n_classes,covariance_type='diag').fit(X).predict(X)

Errors: RuntimeWarning: Failed to converge after 1000 iterations, value is nan

maciejskorski avatar Nov 30 '20 14:11 maciejskorski

Hi Maciej, thanks for providing this feedback, I will have a look to it.

luiscarlosgph avatar Feb 05 '21 17:02 luiscarlosgph

Hello! Any progress on this? I did a little digging, it seems the covariance becomes negative. The return value here I think is where it happens _covar_mstep_diag

leonfoks avatar Apr 29 '21 19:04 leonfoks