Reference · The Applied Higher-Order Functions catalogue
rainbow.algorithms.proofs.ahof.maximum-likelihood
AHoF D10 worked maximum likelihood estimation over exact rationals. Two models are scored on a two-point data set by their per-datum log-likelihoods: model A scores 3/4 and 3/4 (total 3/2), model B scores 1/4 and 1/4 (total 1/2). Maximum likelihood prefers model A, since its total 3/2 is at least model B's 1/2. The totals are proved by cross-product equivalence and the preference by reflexivity of the decided comparison. Scope (measured by the kernel): this module has 4 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.maximum-likelihood` prints this classification.
ahof-d10/model-a-scores
ahof-d10/model-a-scores : → List ℚ≥0
List = data/Listℚ≥0 = nnrat/NonnegativeRational
ahof-d10/model-b-scores
ahof-d10/model-b-scores : → List ℚ≥0
List = data/Listℚ≥0 = nnrat/NonnegativeRational
ahof-d10/model-a-total
ahof-d10/model-a-total : → ℚ≥0
ℚ≥0 = nnrat/NonnegativeRational
ahof-d10/model-b-total
ahof-d10/model-b-total : → ℚ≥0
ℚ≥0 = nnrat/NonnegativeRational
ahof-d10/model-a-total-is-three-halves
ahof-d10/model-a-total-is-three-halves : → ahof-d10/model-a-total = 3/2
= = nnrat/equivalent: equality of rational values
ahof-d10/model-b-total-is-one-half
ahof-d10/model-b-total-is-one-half : → ahof-d10/model-b-total = 1/2
= = nnrat/equivalent: equality of rational values
ahof-d10/mle-prefers-model-a
ahof-d10/mle-prefers-model-a : → bo/is-safe ahof-d10/model-a-total ahof-d10/model-b-total = data/true
= = equality/Eq
ahof-d10/maximum-likelihood
ahof-d10/maximum-likelihood : → proposition/conjunction (ahof-d10/model-a-total = 3/2) (conjunction) where conjunction := proposition/conjunction (ahof-d10/model-b-total = 1/2) (bo/is-safe ahof-d10/model-a-total ahof-d10/model-b-total = data/true)
= = equality/Eq