liveBook · Manning

Conjugacy

Conjugacy is the property whereby a prior distribution and a specified likelihood yield a posterior distribution in the same family as the prior.

How 3 Manning books explain it

Machine Learning Algorithms in Depth

A conjugate prior is a prior distribution whose posterior belongs to the same distributional family after updating with data.

How it is used
Simplifies Bayesian updating by keeping the posterior in the prior’s distributional family.
How deep it goes
Works through Beta posterior count updates for coin flips but leaves the Dirichlet–multinomial posterior as an exercise.
Examples
Uses coin-flip counts, Bernoulli naive Bayes, and a Dirichlet–multinomial posterior exercise.
What you can do after
Build it from scratch for coin flips by updating Beta prior counts with observed heads and tails.

Read how Machine Learning Algorithms in Depth explains conjugacy →

Math and Architectures of Deep Learning

A prior distribution chosen so that, after Bayes' rule is applied with a specified likelihood family, the posterior stays in the same distribution family.

How it is used
Uses distribution-family preservation to simplify Bayesian parameter estimation and prediction.
How deep it goes
Derives Gaussian and gamma updates, extends them to multivariate cases, and stops short of general nonconjugate inference.
Examples
Uses Gaussian mean estimation, gamma precision estimation, normal-gamma joint estimation, Wishart multivariate estimation, and PyTorch code.
What you can do after
Apply conjugate updating and compute a gamma posterior for unknown variance with known mean in PyTorch.

Read how Math and Architectures of Deep Learning explains conjugacy →

Causal AI

A conjugate prior is a prior distribution whose posterior distribution has the same mathematical form as the prior when combined with a specified likelihood.

How it is used
Uses Bayesian parameter learning for categorical conditional probabilities as an alternative to maximum-likelihood count proportions.
How deep it goes
Defines prior-posterior form matching and explains Dirichlet-categorical updating through counts and prior parameters, without sampling or variational inference.
Examples
Uses a Dirichlet prior to smooth commute-mode probabilities, including an extreme 100% estimate for self-employed people in small towns who drive.
What you can do after
Apply via pgmpy’s BayesianEstimator with a Dirichlet prior and pseudo_counts=1 to estimate categorical model parameters.

Read how Causal AI explains conjugacy →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.