Reference · The Applied Higher-Order Functions catalogue
rainbow.algorithms.proofs.ahof.regression-gradient
AHoF O6 Regression Gradient: the least-squares gradient is driven by the residual actual - predicted, which the gradient sums over data: residual actual predicted = actual - predicted. Worked: 4-1=3; a perfect fit has residual 0. Values proved by signed cross-product equivalence. Proved native and axiom-free. Requires signed/subtract, signed/from-nnrat, signed/equivalent (all in the D63 checkpoint). Scope (measured by the kernel): this module has 2 worked instances (statements about specific values) and 1 definitional unfoldings (true by unfolding a definition). None of its theorems is a guarantee about the algorithm for all inputs; `lein verify rainbow.algorithms.proofs.ahof.regression-gradient` prints this classification.
reg-grad/residual
reg-grad/residual : (x₁ x₂ : ℚ) → ℚ
ℚ = signed/SignedRational
reg-grad/residual-example
reg-grad/residual-example : → ℚ
ℚ = signed/SignedRational
reg-grad/perfect-fit
reg-grad/perfect-fit : → ℚ
ℚ = signed/SignedRational
reg-grad/residual-unfold
reg-grad/residual-unfold : (a b : ℚ) → nat-grad/update a b = a - b
- = signed/subtract= = equality/Eqℚ = signed/SignedRational
reg-grad/residual-example-is-3
reg-grad/residual-example-is-3 : → bfgs/change-example = signed/from-nnrat 3
= = signed/equivalent: equality of rational values
reg-grad/perfect-fit-is-0
reg-grad/perfect-fit-is-0 : → dfp/no-step = signed/from-nnrat 0
= = signed/equivalent: equality of rational values