Constant GRADIENT_TOLERANCE
const GRADIENT_TOLERANCE: f64 = 1e-4;Expand description
First-order optimality: the fit has converged — after one final step — when
the residual is this close to orthogonal to every Jacobian column — the largest
|Jₐᵀr| / (‖Jₐ‖·‖r‖), the cosine MINPACK calls gtol.
Scale-free in both the parameters and the residuals, and it has a reading:
under the local linear model, no single parameter can reduce ‖r‖ by more
than cos²/2 of itself — 5e-9 here. The relative-improvement test cannot
say that. An ill-conditioned form creeps along a curved valley, each
accepted step improving by more than it and none by anything that matters:
nine exponential splines on sixty-five government bonds reach this bound at
step 16 and were still creeping at the 200-step cap, 0.05% lower, reported
as a failure.