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 asvd()
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’spinv()
.For that reason, we suggest to use
pinv_smooth()
instead ofpinv
.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.