Skip to content
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

Power method tolerance 1e-5 should be smaller #1982

Open
MargaretDuff opened this issue Nov 8, 2024 · 1 comment
Open

Power method tolerance 1e-5 should be smaller #1982

MargaretDuff opened this issue Nov 8, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@MargaretDuff
Copy link
Member

Description

The default tolerance for the power method, used to calculate the norm of linear operators, is set to 1e-5. This is used when deciding if the calculated norm is small enough to be assumed to be zero and prevents the algorithm from diverging by dividing by zero.

x0_norm = x0.norm()
if x0_norm < tolerance:
log.warning(
"The operator has at least one zero eigenvector and is likely to be nilpotent")
eig_new = 0.
break
x0 /= x0_norm

@bosschmidt found that this incorrectly returned his operator's norm to zero, and setting the tolerance to 1e-8 eventually led to the power method calculating a correct non-zero norm value.

Perhaps this tolerance needs re-thinking.

@MargaretDuff MargaretDuff added the bug Something isn't working label Nov 8, 2024
@MargaretDuff MargaretDuff self-assigned this Nov 8, 2024
@github-project-automation github-project-automation bot moved this to Todo in CIL work Nov 8, 2024
@MargaretDuff
Copy link
Member Author

We will investigate this but in the meantime we should at least change the warning

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Todo
Development

No branches or pull requests

2 participants
@MargaretDuff and others