Sympy-exact witness of the Mahalanobis quadratic-form metric on a diagonal 2×2 covariance. Setup: Σ = diag(1, 4) (feature-2 has 4× the variance of feature-1), μ = origin, x = (2, 2). d² = 2²·1⁻¹ + 2²·4⁻¹ = 4 + 1 = 5 exactly; d = √5. …
Sympy-exact witness of the Mahalanobis quadratic-form metric on a diagonal 2×2 covariance. Setup: Σ = diag(1, 4) (feature-2 has 4× the variance of feature-1), μ = origin, x = (2, 2). d² = 2²·1⁻¹ + 2²·4⁻¹ = 4 + 1 = 5 exactly; d = √5. …