
Estimate noise scale from singular values with linear tail extrapolation
Source:R/utils.R
getScaleFromSVs.RdThis function estimates a characteristic scale from a vector of singular
values
by fitting a linear model to the tail and extrapolating to length n.
The median of the extrapolated values is returned as the estimate.
If no sufficiently linear tail is detected (based on min_r2) or
the extrapolation produces negative values, a fallback estimate is returned
using the 75\