estimate_spectral_radius#

iskra.sparse_linalg.estimate_spectral_radius(f: Callable[[Tensor], Tensor], init: Tensor, maxiter: int) Tensor[SOURCE]#

Estimate spectral radius (max |evals|) of matrix J^T (given as callable f).

Uses the power method to compute the spectral radius of J^T. Can be useful for debugging the inverse of vector-Jacobian products.

Parameters:
  • f (Callable[[Tensor], Tensor]) – Function that computes v @ J.

  • init (Tensor) – Initial guess for largest eigenvector.

  • maxiter (int) – Maximum number of iterations for the solver.

Returns:

(Tensor) – Spectral radius, i.e., the maximum absolute eigenvalue.