sparsax.rcond

sparsax.rcond(Ai, Aj, Ax, n)[source]

A cheap estimate of the reciprocal condition number of an SPD matrix.

CHOLMOD’s (min(diag(L)) / max(diag(L)))^2: 1 is perfectly conditioned, and near 0 means nearly singular. It reads the factor, so it costs nothing beyond the factorization, which it shares with solve(), but it is a rough indicator rather than a bound. CHOLMOD does not scale the matrix, so a badly scaled matrix also scores low, and values are not comparable with lu_rcond(), which scales first. Not differentiable.

Parameters:
Ai

COO matrix as in solve().

Aj

COO matrix as in solve().

Ax

COO matrix as in solve().

n

matrix dimension (static Python int).

Returns:

Scalar float64 in [0, 1].

Raises:

Exception – if the matrix is not positive definite. set_options(on_failure="nan") returns NaN instead.