optim.maxeigen

Contents

optim.maxeigen#

bartorch.optim.maxeigen()#

Estimate the largest eigenvalue of the normal operator by power iteration.

The operator is \(M (A^H A + \lambda I) + \sum_j G_j^H G_j\), as BART’s lsqr2_create and iter2_chambolle_pock form it, with \(M\) the preconditioner and \(G_j\) the terms’ transforms. A solver given eigen=True divides its step by this value.

Parameters:
  • A (LinearOperator) – Encoding operator.

  • terms (Regularizer or iterable of Regularizer, default=None) – Terms whose \(G_j^H G_j\) is added. The primal-dual iteration passes its dual terms; the proximal-gradient iterations pass none.

  • cclambda (float, default=0.0) – \(\lambda\).

  • precond (LinearOperator, default=None) – \(M\), from A.ishape to itself.

  • iterations (int, default=30) – Power iterations; BART uses 30.

Returns:

The estimated eigenvalue.

Return type:

float

Raises:

BartError – The library could not form the operator or run the iteration.

Notes

The starting vector is drawn from BART’s process-wide random generator. An iteration written outside the library calls this where BART’s own loop would, so that later draws – a wavelet term’s random shifts, for instance – follow the same sequence.