torch_numopt.utils.stability#

Functions

fix_cond(mat)

Check condition number and apply fix_stability if ill-conditioned.

fix_stability(mat)

Procedure to adjust a matrix by adding a very small value to the diagonal to avoid numerical instability problems.

pinv_svd_trunc(mat[, thresh])

Procedure to calculate the pseudoinverse of a matrix by using truncated SVD in order to maintain numerical stability.