20.1 Statistical Learning
A statistical model describes how data could have been generated. Learning estimates its parameters from examples, often by maximizing likelihood or a posterior probability.
AI · STATISTICAL LEARNING
Statistical learning fits probability models to data. Complete observations permit direct likelihood optimization; hidden variables require reasoning about their uncertainty.
A statistical model describes how data could have been generated. Learning estimates its parameters from examples, often by maximizing likelihood or a posterior probability.
When all relevant variables are observed, likelihood decomposes into contributions from examples. Maximum-likelihood estimates choose parameters that make observed data probable.
Expectation-maximization alternates an E-step, estimating latent-variable responsibilities using current parameters, with an M-step, updating parameters to maximize expected complete-data likelihood.
One-iteration trace: each of the 14 observed x values gets two soft membership weights (which sum to 1); the weighted sums yield a mean and variance for each Gaussian. The variance is floored at 0.08 to avoid collapse. “Run 10 steps” means exactly ten iterations, not “run until converged.”
Latent-variable model
Fit a two-Gaussian mixture to fixed 1D observations; component labels are hidden.
Ready. Each iteration re-estimates memberships and component parameters.
Let n be the number of observations and K the number of Gaussian components. Each iteration computes K densities/responsibilities per observation and accumulates weighted moments: O(nK) time. Temporary accumulators and one observation's responsibilities need O(K) auxiliary space; the input data take O(n), and the rendered observations/means take O(n+K) UI space. Here n=14 and K=2, so the algorithmic work per iteration is O(n) only because K is fixed at two. Ten iterations multiply time by 10. A general dense covariance Gaussian mixture has different per-component costs; this claim is for the univariate scalar-variance implementation shown.