Skip to content
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

eigs method return different vectors per version (10 vs 13) #3304

Closed
entelostre opened this issue Oct 29, 2024 · 6 comments
Closed

eigs method return different vectors per version (10 vs 13) #3304

entelostre opened this issue Oct 29, 2024 · 6 comments
Labels

Comments

@entelostre
Copy link

entelostre commented Oct 29, 2024

Describe the bug

I call eigs like that:

let covariance = [[99.15192547870485, -206.05811568043288], [-206.05811568043288, 791.0897678733841]];
eigs(covariance);

Results per mathjs version:

v13.1.1
console.log(eigs.eigenvectors.map(e => e.vector));
[[0.9641465805245403, 0.2653702531611938], [-0.2653702531611938, 0.9641465805245403]]

v10.3.0
console.log(eigs.vectors)
[[0.9641465805245403, -0.2653702531611938], [0.2653702531611938, 0.9641465805245403]]

@nkumawat34
Copy link
Contributor

can i work on this issue

@nkumawat34
Copy link
Contributor

it is only coming with real symmetric matrices or did you check with more matrices also.

@nkumawat34
Copy link
Contributor

in case of 10.2.0 version eigen vectors are coming in column wise for eigen values
in case of 13.2.0 version eigen vector you are printing coming in row wise for eigen values.

@josdejong
Copy link
Owner

Thanks for looking into this @nkumawat34 . If I understand you, the results are different but are both valid, right?

@nkumawat34
Copy link
Contributor

yes

@josdejong
Copy link
Owner

Thanks, that makes sense indeed. I think that was changed in v12.0.0 via #3037.

Closing this issue now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants