pub fn select_regime(n_residuals: usize, n_params: usize) -> StepKindExpand description
Choose the step factorization path from the problem shape.
- Many parameters (
p > 40) ⇒StepKind::SvdSecularto avoid squaring the condition number on an ill-conditionedJ. - Tall and thin (
m ≥ 8·p) ⇒StepKind::NormalEqLlt: theJᵀJreduction collapses theO(m)work and thep×pCholesky is trivially cheap. - Otherwise default to
StepKind::NormalEqLlt; a cheap conditioning probe (column-norm ratio) for escalating borderline cases is a known follow-up.
The p > 40 and m ≥ 8·p constants are documented heuristics, not tuned
thresholds — revisit alongside the benchmark.