Reference · The Applied Higher-Order Functions catalogue
rainbow.algorithms.proofs.ahof.bayesian-learning
AHoF D11 worked Bayesian parameter learning over exact rationals. Starting from a prior mass 1/2, the first datum has likelihood 3/2, updating the mass to 1/2 * 3/2 = 3/4; the second datum has likelihood 4/3, updating the posterior to 3/4 * 4/3 = 1. Folding the likelihoods through the prior gives the posterior mass, proved by 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.bayesian-learning` prints this classification.
ahof-d11/prior
ahof-d11/prior : → ℚ≥0
ℚ≥0 = nnrat/NonnegativeRational
ahof-d11/first-update
ahof-d11/first-update : → ℚ≥0
ℚ≥0 = nnrat/NonnegativeRational
ahof-d11/posterior
ahof-d11/posterior : → ℚ≥0
ℚ≥0 = nnrat/NonnegativeRational
ahof-d11/first-update-is-three-quarters
ahof-d11/first-update-is-three-quarters : → ahof-d11/first-update = 3/4
= = nnrat/equivalent: equality of rational values
ahof-d11/posterior-is-one
ahof-d11/posterior-is-one : → ahof-d11/posterior = 1
1 = nnrat/one= = nnrat/equivalent: equality of rational values
ahof-d11/bayesian-learning
ahof-d11/bayesian-learning : → proposition/conjunction (ahof-d11/first-update = 3/4) (ahof-d11/posterior = 1)
1 = nnrat/one= = nnrat/equivalent: equality of rational values