-
Notifications
You must be signed in to change notification settings - Fork 238
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
Eigenvalue Power Iteration Fails Randomly #346
Comments
I tried having the algorithm compute the dominant eigenvalue twice using two different random initial guesses and comparing the result. If they did not match, then to try again. This greatly improved the likelihood that it would get the right answer, but it only took running the unit test cases a couple hundred times for the randomness to strike and it computed the same wrong answer twice with two bad initial guesses. Is there a way choose an initial guess in a more intelligent way to ensure that the algorithm always converges to the correct dominant eigenvalue? |
My research suggested a random matrix “to reduce the likelihood of choosing a Vector orthogonal to an Eigen Vector”. I don't Know a better method. I can see what R does. |
I think we can close this one. |
The eigenvalue power iteration method uses a random matrix to start its process. Sometimes this random matrix does not allow it to converge to the correct dominant eigenvalue.
I've added new tests in the develop branch so it happens more frequently when you run the unit tests.
I tried changing the random matrix to all ones using this code:
It seemed to work. However, it failed on this test case, coming up with 1 instead of 5:
@Beakerboy
Do you have any thoughts on how to make this more stable and deterministic?
The text was updated successfully, but these errors were encountered: