-
Notifications
You must be signed in to change notification settings - Fork 119
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
Wrong eigenvalues in the EJML v0.34 #35
Comments
Could you provide a couple of lines of code which demonstrate this problem? |
thank you for your response. Here they are SimpleMatrix D; // read a matrix from the D.txt file System.out.println("evd"+evd.getEigenvalues()); As you can see the last two lines of the code will return different eigenvalues. In principle, both functions should return the correct non-zero eigenvalues, which are 0.866 and -0.866. Also, I have another problem when computing eigenvalues for the M matrix (see in attached file) M.txt. For example, if I use the following codes: Could you please have a look at it? Thank you in advance! |
I've verified that this is a real issue. I was able to decompose the M.txt matrix by increasing the number of exceptional shifts, but I'm wondering if there might be a better way to perform this iteration. Eigenvalue decomposition is very tricky to get right. I'll look into the SVD issue a little bit later |
@nhavt If possible can you figure out a simple formula to generate matrices which cause the current algorithm to fail? That will make creating a unit test much easier. |
Thank you for your help. As to a simple formula to generate such matrices, I don't have a simple formula at the moment. Looking at the structure of M matrix, I observe there are a lot of zeros in this matrix. So, my guess is that if you could create a sparse matrix with a few non-zero elements. That might give you a unit test. However, I will double check it and let you know. Thank you! |
Hi there,
When computing eigenvalues for the matrix D ( see in attached file) with the EJML v0.34 [D.txt] (https://github.com/lessthanoptimal/ejml/files/2087909/D.txt), I found there is a bug in the function D.svd.getW() as it returned wrong eigenvalues for the matrix D. However when I used the function D.eig().getEigenvalues(), it returned the correct eigenvalues, which are 0.866, and 0.866. Therefore, could you please check this? Thank you in advance!
Nha
The text was updated successfully, but these errors were encountered: