-
Notifications
You must be signed in to change notification settings - Fork 15
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
Problem in Beyn Contour Rank Revealing #162
Comments
Thanks. Indeed, the recommendation / warning seems off. I agree. Returning incorrect results is bad, and should be avoidable in this case. In order to reliably investigate this issue, it would be nice to first implement the correct eigenvector extraction (from the SVD as described in Beyn's paper) rather than our current "naive" eigenvector extraction 4f32fed. This will anyway be necessary if we continue with #154 and remove |
Wish-list / todo-list:
I think 4 should be made optional through a kwarg, since I fear it might get computationally demanding in an HPC-setting (depending on problem and which errmeasure we use). |
The way that contour_beyn deals with more or fewer eigenvalues inside the contour than asked for leads to inaccurate answers.
As written, it seems that if you ask for
k
eigenvalues and the contour actually enclosesneigs<k
, then allk
eigenvalues of the matrixB
are returned, and are not marked as fictitious. Furthermore, it seems that the warning saying a rank drop is detected triggers in this scenario, and it encourages a smallerk
. However, asking fork>neigs
is actually not a problem so long as the extraneous eigenvalues/vectors are either not returned or marked as such.Next, if
k<neigs
, the algorithm is in principle inaccurate, but there is to my knowledge no way to diagnose this from the results. Ifk=neigs
than the algorithm should be accurate, but again there is no way to distinguish this from thek<neigs
case just by looking at the answer.One way to ensure the algorithm is accurate is to reveal the rank in the SVD by looking for negligible singular values, which indicates that
k>neigs
which is the limit where the algorithm works. This is exactly what the current warning discourages.I think an easy fix would be to look for the small singular values (which is what the warning is currently triggered by), and to throw them away, or perhaps later mark them with NaNs, and to reverse the sense of the warning. In other words, the new warning would be triggered if the rank is not revealed and suggest the user increase
k
.The text was updated successfully, but these errors were encountered: