Pseudoinverse fitting with a parameter-dependent covariance range requires checking the allowed residual subspace separately for each fitted parameter. If the covariance is and the residual is , the range restriction in singular-covariance spectral fitting becomes
The Moore-Penrose inverse quadratic 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 , zero mean and . Noise lies on a line that rotates with . With observation and , the model at permits the observation and gives quadratic value four. At , 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.[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 , use . For , 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.
Rank deficiency from deterministic spectral upsampling occurs because a deterministic map cannot manufacture independent measurements. For and input covariance matrix ,
When the output has more channels than the input, its covariance matrix is necessarily singular. Covariance of count-conserving rebinned Raman channels gives the conserved-count example and its full propagated uncertainty.[ref]
Using that parent's two-to-three channel map, the output always satisfies . If the input readings are and , the rebinned vector is . Recovering the original readings as and shows that the third displayed number is not a third independent observation.
For an original fitting example, suppose both input means equal an unknown and their independent measurement-error variances are known to be . Fitting in the original channels gives , with variance . A correct generalized least squares fit after rebinning gives the same result and uncertainty. It must use the singular covariance on its supported range, for example through the Moore-Penrose inverse, together with the exact linear constraints.
The range restriction in singular-covariance spectral fitting matters if a proposed output model fails those constraints. A residual along cannot arise from this rebinning model at all. Merely inserting a pseudoinverse into a quadratic objective would assign zero penalty to that impossible direction. Either enforce the range condition or supply a physically justified additional noise model; adding a small diagonal term solely to make the matrix invertible changes the statistical assumptions.
The motivating Raman apparatus measures detector-array spectra before any subsequent numerical grid change.[ref] Working on the original grid often avoids this singular fitting problem while retaining the actual measurement information.