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

Improve WCPG estimation technique #4

Open
hidmic opened this issue Jun 7, 2021 · 1 comment
Open

Improve WCPG estimation technique #4

hidmic opened this issue Jun 7, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@hidmic
Copy link
Owner

hidmic commented Jun 7, 2021

Worst case peak gain in ltitop is currently estimated by brute force:

# TODO(hidmic): do better than brute force
WCPG = D
Ap = np.eye(A.shape[0])
WCPG_terms = np.zeros_like(D)
for n in range(math.ceil(nmax / 100)):
WCPG_terms[:] = 0.
for _ in range(n * 100, (n + 1) * 100):
WCPG_terms += np.abs(C @ Ap @ B)
Ap = Ap @ A
WCPG += WCPG_terms
if np.all((WCPG_terms / WCPG) <= rel_tol):
break # early

Accuracy guarantees are thus quite loose, and the resulting performance is awful. It calls for a better approach.

@hidmic
Copy link
Owner Author

hidmic commented Jun 7, 2021

I've attempted to use fixif.WCPG for this, but performance isn't great either and the requirement on the system matrix A to be diagonalizable is a bit limiting.

@hidmic hidmic added the enhancement New feature or request label Sep 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant