Reference · The Applied Higher-Order Functions catalogue
rainbow.algorithms.proofs.ahof.em
AHoF D13 EM Algorithm: fit latent-variable model parameters by alternating an E-step (compute the expected complete-data log-likelihood under the current parameters) and an M-step (maximize it). The defining property of EM is monotone ascent -- each iteration's likelihood is at least the previous one: improves? next-likelihood current-likelihood = decide (current-likelihood <= next-likelihood) over the exact-rational (log-)likelihoods. Proved native and axiom-free: the ascent test, and worked instances on concrete likelihoods -- a step from 5 to 8 is accepted; the certificate 5 <= 8 as a native nnrat/at-most; and on equal likelihoods (8, 8) the test is true but shows no progress. EM's monotone ascent and its convergence are classical and are not proved here. The E-step expectation and M-step maximization are executable / pluggable concerns; what is proved here is the ascent test at these instances. Requires nnrat/at-most, audit/decide-nnrat-at-most, nnrat/decide-at-most-true-sound (all in the D63 checkpoint). 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.em` prints this classification.
em/improves?
em/improves? : (x₁ x₂ : ℚ≥0) → data/Bool
ℚ≥0 = nnrat/NonnegativeRational
em/iteration-ascends
em/iteration-ascends : → bo/is-safe 8 5 = data/true
= = equality/Eq
em/never-decreases-likelihood
em/never-decreases-likelihood : → 5 ≤ 8
≤ = nnrat/at-most
em/converged-at-fixed-point
em/converged-at-fixed-point : → bo/is-safe 8 8 = data/true
= = equality/Eq