-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
incorrect eigs(A,B) results for indefinite B #488
Comments
If you compare to @andreasnoack, does |
From ARPACK: So julia should either check that B is spd and throw if not, or transform to B^-A. |
The manual recommends transforming the generalized problem to |
Maybe as a post-process? As far as I can see ARPACK returns B-normalized vectors iff B is positive semidefinite. Maybe ARPACK has more info in INFO or RESID. |
do we need am ispossemidef function? |
|
|
Or just a |
I thought that too, but I wonder if that can have a meaningful distinction from isposdef with round-off error. Looking at the results from ARPACK, in the case of a non-semidefinite B matrix, ARPACK reports success: INFO is set to 0, the number of arnoldi iterations is still smaller than the maximum number, but the residuals are rubbish (order 1). In the use case of JuliaLang/julia#17873 the residuals were order 1e-8. How about a check on the residuals, with a warning when they exceed eps^1/3*norm(A) or similar? Or will that flag false positives? |
My concern as well. For rank deficient problems the criterion would probably show slight indefiniteness so a tolerance would be required.
If something like that works reliably, I'd have expected ARPACK to report it in an info code. |
Continued from #354
Yes, and transform back after the calculation. The current solver should probably only be chosen when the |
We could perhaps allow a keyword argument to specify so as a stopgap? |
The difference in the results of two calls to
The bugs reported in the issue comments still seem relevant. |
For completeness: eigs calls ARPACKs
|
Now tracked in JuliaLinearAlgebra/Arpack.jl#15 |
I encountered a strange issue when solving the generalized eigenvalue problem in Julia 0.6 (version on mac os, but also on 0.5 and 0.6 in Juliabox). When trying to solve the generalized eigenvalue problem: Ax = λBx with julia, like so:
The outcome is actually changing with every call to
eigs(A,B)
(also with simpler matrices). In the case of B being a diagonal Matrix (so that the generalized eigenvalue problem reduces to the standard eigenvalue problem Ax = λx) the results ofeigs(A,B)
are consistent. This problem does not occur, e.g. in scipy.linalg .Cheers, Felix
The text was updated successfully, but these errors were encountered: