nifty8.re.num.lanczos module#

lanczos_tridiag(mat: Callable[[V], V], v: V, order: int)[source]#

Compute the Lanczos decomposition into a tri-diagonal matrix and its corresponding orthonormal projection matrix.

stochastic_logdet_from_lanczos(tridiag_stack: ~jax.Array, matrix_shape0: int, func: ~typing.Callable = <PjitFunction of <function jax.numpy.log>>)[source]#

Computes a stochastic estimate of the log-determinate of a matrix using its Lanczos decomposition.

Implemented via the stoachstic Lanczos quadrature.

stochastic_lq_logdet(mat: ~jax.Array | ~typing.Callable, order: int, n_samples: int, key: int | ~jax.Array, *, shape0: int | None = None, dtype=None, cmap=<function vmap>)[source]#

Computes a stochastic estimate of the log-determinate of a matrix using the stochastic Lanczos quadrature algorithm.