Closed 009deep closed 3 years ago
Sorry I won't have time to look into this any time soon, but here are two easy diagnostics:
training_data
, add a small amount of Gaussian noise with mean 0 and standard deviation .05 * np.std(column_j))
to every column j in your training_data
, independently. Then, fit the model. This should also run if your data is formatted the same way the MNIST data is formatted in the example.If (1) runs, but not (2), my first guess would be that something is probably not right with the data formatting. If both (1) and (2) run, you probably have colinearity/multicolineairty-like issues within or between categories.
Edit for future users. See 009deep's response below: the issue was that there were too few observations per class relative to the number of classes.
Thanks for quick response.
I analyzed and error is attributed to disproportion size of classes to sample/classes. I have total classes in 1000s and sample/class in 10s. This error can also be simulated by feeding only first 10 training samples in mnist_demo notebook. I basically affects value of Sw
in eq 1.
I'll close it as error seems geared towards data and not code.
Thanks a lot for figuring out the issue and sharing the lessons! I just realized my response to a previous issue could have been potentially useful to you: https://github.com/RaviSoji/plda/issues/49. I totally forgot about that -- sorry!
Ravi B. Sojitra
Hi @RaviSoji I am using this code as shown in mnist_demo nothebook. I am using my own data.
If I use
classifier.fit_model(training_data, training_labels, n_principal_components=None)
, I get following error:And if I use some value for n_principal_components such as
classifier.fit_model(training_data, training_labels, n_principal_components=5)
, I get following error:I tried by freshly installing environment but errors are same. Any suggestion what is causing error?
Thanks.