netket.optimizer.solver.pinv

Contents

netket.optimizer.solver.pinv#

netket.optimizer.solver.pinv(A, b, *, rtol=1e-12, x0=None, rcond=None)[source]#

Solve the linear system using jax’s implementation of the pseudo-inverse.

Internally it calls pinv() which uses a svd() decomposition with the same value of rtol.

Note

In general, we found that our custom implementation of the pseudo-inverse netket.optimizer.solver.pinv_smooth() (which internally uses hermitian diagonaliation) outperform jax’s pinv().

For that reason, we suggest to use pinv_smooth() instead of pinv.

Note

If you pass only keyword arguments, this solver will directly create a partial capturing them.

The diagonal shift on the matrix can be 0 and the rtol variable can be used to truncate small eigenvalues.

Parameters:
  • A – the matrix A in Ax=b

  • b – the vector b in Ax=b

  • rtol (float) – Cut-off ratio for small singular values of A.

  • rcond (float) – (deprecated) Alias for rtol. Will be removed in a future release.