Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Default to shift-and-invert mode for eigs for numeric sigma #6053

Merged
merged 7 commits into from Mar 6, 2014

Conversation

Projects
None yet
3 participants
Member

jiahao commented Mar 5, 2014

This PR replaces #5776.

@jiahao jiahao added this to the 0.3 milestone Mar 5, 2014

Owner

ViralBShah commented Mar 5, 2014

gcc build passed.

Contributor

acroy commented Mar 5, 2014

@jiahao : ARPACK per se doesn't require which="LM for shift-and-inverse mode, however the rationale was that when sigma is specified one expects to always get eigenvalues close to it. But I agree that which="LM" by default is sufficient for that.

Maybe we should clarify in the docs that (a) which="SM" could be slow and one might want to use sigma=0 instead (this was (part of) the problem in #4474) and (b) which refers to the shifted and inverted eigenvalues (i.e. sigma=0 + which="LM" gives the smallest eigenvalues).

As an aside: in MATLAB sigma::Number also implies which="LM" (actually MATLAB only has sigma which can be a scalar or "LM", "SM" etc.) and in NumPy which refers to the shifted and inverted eigenvalues if sigma!=None.

Member

jiahao commented Mar 5, 2014

In general I am not in favor of behavior that silently overrides user input. If the user specifies which!="LM", we shouldn't magically change it due to interaction with the value of sigma on top of that. Seems like the current behavior should be acceptable.

Member

jiahao commented Mar 5, 2014

Rebased and updated documentation with explanation of how sigma and which can interact.

jiahao added some commits Mar 5, 2014

@jiahao jiahao New semantics of sigma in eigs(A, sigma)
- `sigma==nothing` specifies forward iteration (ARPACK `iparam(7)=1`), and a numeric real or complex sigma specifies inverse iteration with level shift (`iparam(7)=3` or 4 depending on `complexOP`)
4c22dfd
@jiahao jiahao Update documentation of eigs
- Specifies _all_ the valid values of the `which` keyword in a table.
- Updates `sigma` to its new default and semantics.
- Clarify interaction of `sigma` and `which` keywords via the type of linear operator that is constructed and passed to ARPACK.
65a3cd3

@jiahao jiahao added a commit that referenced this pull request Mar 6, 2014

@jiahao jiahao Merge pull request #6053 from JuliaLang/pr/5776
Default to shift-and-invert mode for eigs for numeric sigma
173ccc2

@jiahao jiahao merged commit 173ccc2 into master Mar 6, 2014

1 check passed

default The Travis CI build passed
Details

@jiahao jiahao deleted the pr/5776 branch Mar 6, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment