Documentation

9.7 Ridge stabilization and pseudoinverses

sym_inverse follows an explicit decision path rather than silently forcing every matrix through one method.

Matrix safeguard decision path
  1. Reject non-finite entries.
  2. Symmetrize.
  3. Try ordinary Cholesky.
  4. If it fails, compute eigenvalues and scale.
  5. Add an escalating diagonal ridge and retry Cholesky.
  6. If no permitted ridge succeeds, invert positive eigen-directions above a relative threshold.
  7. Fail when no usable positive direction remains.

Table 9.1. Loose stabilization defaults

Setting Value
Initial relative ridge 1e-8
Ridge multiplier 10
Maximum relative ridge 1e6
Relative eigen/SVD tolerance 1e-12

These LOOSE settings are intended for per-subject conditional curvature during mode search. Other configuration paths construct their own bounds; never advertise one set as universal.

The ridge is relative to max(|largest eigenvalue|, max absolute entry, 1e-300). Every successful ridge or rank-deficient pseudoinverse is debug-logged with eigenvalue context. The returned result identifies method, rank, minimum/maximum eigenvalues and ridge.

Interpretation

A ridged inverse changes the problem. A pseudoinverse drops directions. They may be operationally necessary, but rank loss or a large ridge is scientific diagnostic information about identifiability, curvature or design.

Common mistakes

  • Calling a stabilized result the original inverse.
  • Using loose per-subject limits as global covariance defaults.
  • Ignoring numerical rank in downstream degrees of freedom.

Checklist

  • Record method, ridge, rank and eigenvalue range.
  • Set maximum repair before the analysis.
  • Escalate large repairs for scientific review.

Further reading

See condition and PSD repair, logging diagnostics and Chapter 7's effective settings.