Reference · The Applied Higher-Order Functions catalogue
rainbow.algorithms.proofs.ahof.levenberg-marquardt
AHoF O31 worked Levenberg-Marquardt: the general descent skeleton with a damped Hessian-inverse step size, on the quadratic f(x) = x^2. The gradient is 2x, the Hessian is the constant 2, and the damping lambda is 2, so the step size is 1 / (2 + 2) = 1/4. From x = 2 the step is 2 - (1/4)(2*2) = 1 -- a damped step, larger than Newton's leap to 0 (lambda = 0) but a real descent. The result is proved by signed cross-product equivalence. Scope (measured by the kernel): this module has 3 worked instances (statements about specific values). None of its theorems is a guarantee about the algorithm for all inputs; `lein verify rainbow.algorithms.proofs.ahof.levenberg-marquardt` prints this classification.
ahof-o31/hessian
ahof-o31/hessian : (x₁ : ℚ) → ℚ≥0
ℚ = signed/SignedRationalℚ≥0 = nnrat/NonnegativeRational
ahof-o31/lambda
ahof-o31/lambda : → ℚ≥0
ℚ≥0 = nnrat/NonnegativeRational
ahof-o31/direction
ahof-o31/direction : (x₁ : ℚ) → ℚ
ℚ = signed/SignedRational
ahof-o31/step-size
ahof-o31/step-size : (x₁ : ℚ) → ℚ≥0
ℚ = signed/SignedRationalℚ≥0 = nnrat/NonnegativeRational
ahof-o31/update
ahof-o31/update : (x₁ : ℚ) (x₂ : ℚ≥0) (x₃ : ℚ) → ℚ
ℚ = signed/SignedRationalℚ≥0 = nnrat/NonnegativeRational
ahof-o31/initial
ahof-o31/initial : → ℚ
ℚ = signed/SignedRational
ahof-o31/trajectory
ahof-o31/trajectory : (x₁ : ℕ) → ℚ
ℕ = data/Natℚ = signed/SignedRational
ahof-o31/damped-step-is-one
ahof-o31/damped-step-is-one : → optimization/general-descent-iterate ahof-o26/direction ahof-o31/step-size ahof-o31/update 1 ahof-o31/initial = signed/from-nnrat 1
1 = nnrat/one= = signed/equivalent: equality of rational values
ahof-o31/levenberg-marquardt-recurrence
ahof-o31/levenberg-marquardt-recurrence : → proposition/conjunction (iterate₁ = ahof-o31/initial) (iterate = (fun x₂ => fun previous => step previous) 0 ahof-o31/initial) where iterate := optimization/general-descent-iterate ahof-o26/direction ahof-o31/step-size ahof-o31/update 1 ahof-o31/initial where iterate₁ := optimization/general-descent-iterate ahof-o26/direction ahof-o31/step-size ahof-o31/update 0 ahof-o31/initial where step := optimization/general-descent-step ahof-o26/direction ahof-o31/step-size ahof-o31/update
= = equality/Eq
ahof-o31/levenberg-marquardt
ahof-o31/levenberg-marquardt : → proposition/conjunction (iterate = signed/from-nnrat 1) (proposition/conjunction (iterate₁ = ahof-o31/initial) (iterate = (fun x₄ => fun previous => step previous) 0 ahof-o31/initial)) where iterate := optimization/general-descent-iterate ahof-o26/direction ahof-o31/step-size ahof-o31/update 1 ahof-o31/initial where iterate₁ := optimization/general-descent-iterate ahof-o26/direction ahof-o31/step-size ahof-o31/update 0 ahof-o31/initial where step := optimization/general-descent-step ahof-o26/direction ahof-o31/step-size ahof-o31/update
1 = nnrat/one= = equality/Eq