liveBook · Manning

Maximum likelihood estimation

As explained in Causal AI

Maximum likelihood estimation selects parameter values that maximize the probability or likelihood of the observed data.

A causal graphical model needs numerical parameters for its probability distributions. Maximum likelihood estimation (MLE) chooses the parameter values under which the observed training data are most likely. Likelihood asks how probable the data would be for a candidate parameter value; it does not, by itself, establish that the model represents the true data-generating process. section 2.3.4 section 2.5

For data D and parameters θ, the objective is to maximize P(D | θ). Implementations usually maximize log P(D | θ) instead: it has the same maximizer and is easier to work with mathematically and computationally. Equivalently, minimizing negative log-likelihood is a loss-minimization problem. Some estimates have a mathematical solution, as in certain linear regression models; others require numerical optimization. For neural networks, optimization may find a high-likelihood candidate rather than the maximum. section 2.3.4

Fit a conditional probability table

With categorical data, MLE reduces to proportions of counts. To estimate P(O=emp | E=high), divide the number of records with both O=emp and E=high by the number with E=high. In pgmpy, BayesianNetwork.fit(data) uses MLE as its default parameter-learning method; no estimator argument is needed. section 3.1.9

MLE is one choice within a broader parameter-learning workflow. L2 regularization changes the loss to discourage very large estimates. Bayesian estimation instead places a prior distribution on parameters and infers from both that prior and the data. These choices should not be confused with determining whether the model’s causal assumptions are sound. section 2.3.4 section 2.5

How Causal AI covers it

How deep it goes
Defines the objective, explains log-likelihood and optimization, and works through categorical count proportions without deriving a general optimizer.
Examples
Uses a conditional probability estimated from categorical counts and the default estimator in pgmpy’s BayesianNetwork.fit.
What it assumes
Builds likelihood from observed data and candidate parameters while relying on basic probability distributions and conditional probabilities.
What you can do after
Apply it via pgmpy’s BayesianNetwork.fit to estimate categorical conditional probability tables, or recognize when numerical optimization is needed.
How it connects
Connects negative log-likelihood loss, regularization, Bayesian estimation, conditional probability tables, and data-generating processes to parameter learning.

Also explained in

Compare how 4 books explain maximum likelihood estimation →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Causal AI. The section links point to the parts of the book it draws on.