= Pseudoinverse fitting with a parameter-dependent covariance range
{title2=$(I-C_\theta C_\theta^+)\mathbf r_\theta=0$}
\b[Pseudoinverse fitting with a parameter-dependent <covariance> range] requires checking the allowed residual subspace separately for each fitted parameter. If the <covariance> is $C_\theta$ and the residual is $\mathbf r_\theta=\mathbf y-\mathbf m(\theta)$, the <range restriction in singular-covariance spectral fitting> becomes
$$
(I-C_\theta C_\theta^+)\mathbf r_\theta=0.
$$
The <Moore-Penrose inverse> quadratic $\mathbf r_\theta^TC_\theta^+\mathbf r_\theta$ alone does not enforce this condition. A projector computed at one trial parameter need not describe another trial's allowed noise.
For an original example, let $\mathbf u_\theta=(\cos\theta,\sin\theta)^T$, zero mean and $C_\theta=\sigma^2\mathbf u_\theta\mathbf u_\theta^T$. Noise lies on a line that rotates with $\theta$. With observation $\mathbf y=(2,0)^T$ and $\sigma=1$, the model at $\theta=0$ permits the observation and gives quadratic value four. At $\theta=\pi/2$, the pseudoinverse quadratic is zero, yet the observation is outside the allowed vertical line. Minimizing that quadratic without its range constraint would reward an impossible candidate.
The pinned SciPy documentation describes singular-<covariance> evaluation using pseudo-determinants, pseudoinverses and <covariance> rank; its implementation additionally applies a numerical support mask and returns zero density, or negative-infinite log density, off support.<SciPy 1.16.2 documentation>[scipy.stats.multivariate_normal, Notes; v1.16.2 scipy/stats/_multivariate.py, _PSD._support_mask and multivariate_normal_gen.pdf/logpdf]{ref} Parameter-dependent supports also require care about which measure defines a density. Values defined on different subspaces are not automatically a common likelihood merely because each uses the same-looking formula.
A physically justified transverse noise resolves the idealized singularity. With perpendicular unit vector $\mathbf v_\theta$, use $C_{\theta,\epsilon}=\sigma^2\mathbf u_\theta\mathbf u_\theta^T+\epsilon^2\mathbf v_\theta\mathbf v_\theta^T$. For $\epsilon=0.1$, the two quadratic values become four and four hundred. The determinant is the same at these orientations, so this full-rank Gaussian model correctly disfavors the transverse observation.
The <transverse-noise limit of a rotating rank-one covariance model> is an inference about a stated physical noise model, not permission to add arbitrary diagonal noise for numerical convenience. In spectral work, distinguish a parameter-dependent physical noise direction from a fixed deterministic rebinning matrix; the latter has a fixed output range when its input <covariance> is positive definite.
Back to article page