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\
getScaleFromSVs(sv, n, min_r2 = 0.95)A numeric scalar giving the estimated scale. If linear extrapolation
is unreliable, returns sv[ceiling(0.75 * length(sv))].