You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a result of some of the issues with shift-and-invert mentioned in #126, I decided to use SortRule::SmallestMagn to get my smallest eigenvalues. However, it seems that - under certain conditions - the last eigenvalue is completely omitted from the output. In this case, the last eigenvalue is very close to zero, which probably contributes to its omission.
I have set up a reproducible example at https://github.com/LTLA/DebuggingSpectra using the debug2.* scripts. (Note the 2, not the 1 used in #126.) Again, I only use R to handle the boilerplate I/O in debug2.R, the real problem occurs in the C++ code in debug2.cpp. I compare the output of SortRule::SmallestMagn against shift-and-invert, and the output from debug2.R is:
0.013475 # where's my last eigenvalue?
0.00652111
0.00390492
0.00652111 # shift and invert gives me what I want
0.00390492
-1.17311e-16
Some additional observations:
Turning down tol = 1e-12 or lower in SymEigsSolver::compute() is enough to recover the lost eigenvalue.
The eigenvalue is not lost when I do run_shift(test@x, test@i, test@p, order=nrow(test), 3) instead of 2.
Is this a known behavior? Incidentally, RSpectra has no problems with the same matrix in the same mode:
As a result of some of the issues with shift-and-invert mentioned in #126, I decided to use
SortRule::SmallestMagn
to get my smallest eigenvalues. However, it seems that - under certain conditions - the last eigenvalue is completely omitted from the output. In this case, the last eigenvalue is very close to zero, which probably contributes to its omission.I have set up a reproducible example at https://github.com/LTLA/DebuggingSpectra using the
debug2.*
scripts. (Note the 2, not the 1 used in #126.) Again, I only use R to handle the boilerplate I/O indebug2.R
, the real problem occurs in the C++ code indebug2.cpp
. I compare the output ofSortRule::SmallestMagn
against shift-and-invert, and the output fromdebug2.R
is:Some additional observations:
tol = 1e-12
or lower inSymEigsSolver::compute()
is enough to recover the lost eigenvalue.run_shift(test@x, test@i, test@p, order=nrow(test), 3)
instead of 2.Is this a known behavior? Incidentally, RSpectra has no problems with the same matrix in the same mode:
The text was updated successfully, but these errors were encountered: