Reference · The Applied Higher-Order Functions catalogue
rainbow.algorithms.proofs.ahof.kernel-smoothing
AHoF D26 Kernel Smoothing value-function approximation: approximate the value at a query state by a kernel-weighted average of the stored sample values, with weights given by a similarity kernel. The unnormalized estimate (numerator) is the kernel-weighted sum of sample values: weighted-sum k1 v1 k2 v2 = k1 * v1 + k2 * v2 and the normalizer is the kernel weight total k1 + k2; the value estimate is their ratio (a division, executable). Proved native and axiom-free over exact rationals: the kernel-weighted numerator and the weight-total normalizer, with worked instances that reduce by reflexivity. The similarity kernel k(s, s_i) = exp(-||s - s_i||^2 / h) is transcendental and executable -- its VALUES are supplied as rationals. What is proved here is the deterministic weighting arithmetic. Requires nnrat/add and nnrat/multiply (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.kernel-smoothing` prints this classification.
kernel-smoothing/weighted-sum
kernel-smoothing/weighted-sum : (x₁ x₂ x₃ x₄ : ℚ≥0) → ℚ≥0
ℚ≥0 = nnrat/NonnegativeRational
kernel-smoothing/weight-total
kernel-smoothing/weight-total : (x₁ x₂ : ℚ≥0) → ℚ≥0
ℚ≥0 = nnrat/NonnegativeRational
kernel-smoothing/weighted-sum-unfold
kernel-smoothing/weighted-sum-unfold : (k1 v1 k2 v2 : ℚ≥0) → ekf/update k1 v1 k2 v2 = k1 · v1 + k2 · v2
+ = nnrat/add= = equality/Eq· = nnrat/multiplyℚ≥0 = nnrat/NonnegativeRational
kernel-smoothing/weighted-sum-example
kernel-smoothing/weighted-sum-example : → ekf/update 2 3 1 4 = 10
= = equality/Eq
kernel-smoothing/weight-total-example
kernel-smoothing/weight-total-example : → astar/f-value 2 1 = 3
= = equality/Eq