Skip to content

Improve WCPG estimation technique #4

@hidmic

Description

@hidmic

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions