Skip to content
Rainbow docs menu

Reference · The Applied Higher-Order Functions catalogue

rainbow.algorithms.proofs.ahof.regression-gradient

The Applied Higher-Order Functions cataloguesrc/rainbow/algorithms/proofs/ahof/regression_gradient.clj3 definitions, 3 theorems

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

DefinitionSource, line 44

reg-grad/residual :
  (x₁ x₂ : ℚ)
  → ℚ

ℚ = signed/SignedRational

reg-grad/residual-example

DefinitionSource, line 49

reg-grad/residual-example :
  → ℚ

ℚ = signed/SignedRational

reg-grad/perfect-fit

DefinitionSource, line 53

reg-grad/perfect-fit :
  → ℚ

ℚ = signed/SignedRational

reg-grad/residual-unfold

TheoremHolds by unfolding a definitionNo axiomsSource, line 59

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

TheoremWorked exampleNo axiomsSource, line 67

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

TheoremWorked exampleNo axiomsSource, line 72

reg-grad/perfect-fit-is-0 :
  → dfp/no-step = signed/from-nnrat 0

= = signed/equivalent: equality of rational values