Maoritzio
Maoritzio

Reputation: 1242

Eigenvalue and the corresponding EigenVector in Java

Given a Matrix, I'm interested in the Eigenvalues and the corresponding Eigenvector.

Using Jama, I can get the Eigenvalues and the Eigenvectors, yet the correlation between the two is not defined: I want to map each Eigenvector to the corresponding Eigenvalue.

Can you please recommend me of a way to do so? I tried to implement it myself but it got nasty.

Thanks :)


I am trying to look for an authorized answer, yet for now, According to experiments and observation I performed, the eigenvectors and evigenValues seem to be corresponding.

Upvotes: 1

Views: 1440

Answers (3)

Maoritzio
Maoritzio

Reputation: 1242

I asked the developer of the Weka by mail regrading the above issue and they confirm the assumption -

The eigenvectors are indeed provided in the same order as the eigenvalues.

Upvotes: 1

Sean Owen
Sean Owen

Reputation: 66891

Usually they are presented in corresponding order. But you can always multiply an eigenvector by the matrix and seeing what multiplier it applies to the vector. That's also your eigenvalue directly.

Upvotes: 1

Niklas
Niklas

Reputation: 409

Use a hashmap to store them? I'm not sure this answer is relevant given the question is a bit vague..

Upvotes: 0

Related Questions