-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DomainError for FactorAnalysis #81
Comments
Either the covariance matrix is not positive definite or there is an accumulated floating-point error. If you could provide data sample, I'll look into it. |
Thanks for getting back to me! I just checked, the covariance matrix seems to be positive definite, so it might be accumulated floating point errors. I have attached an example matrix as a jld file but Github doesn't allow uploads of that file type so I added .zip to the file name i.e. don't try to extract it, just remove the .zip from the file name. Thanks! |
It that a 19-dimensioanal data? If it is the case I think you incorrectly passed your data to a All functions in this package accept column-major order data. So if you pass your matrix as it is (size 2457x19), you'll get 19 records of 2457 dims which definitely results in a non-positive definite covariance matrix. If it is not the case just transpose your input. |
Hmm I'm not sure I understand. My input data has 19 samples (as columns) with 2457 features (as rows) and I checked for positive definiteness by doing |
This package uses data in a column-major order means which means that in a data matrix, each column corresponds to a sample/observation, while each row corresponds to a feature (variable or attribute or dimension). If the matrix size is 2457x19 then you have a 19 2457-dimensional samples. By default, So, you call julia> count(eigvals(cov(X, dims = 2)) .< 0)
1223 |
Oh dang, I misunderstood! Thanks for your help!! |
Hi,
I am trying to run factor analysis on a matrix of size 2457x19 (all float64's + quite sparse). When calling
fit(FactorAnalysis, X)
I get the error:I'm not doing anything fancy before running the method, so there might be a bug in the actual code. I could also supply my input matrix if you want... What can I do to fix this?
The text was updated successfully, but these errors were encountered: