Typical Sets:
What They Are and How
to (Hopefully) Find Them
Josh Speagle
[email protected]
Based on this talk by Michael Betancourt at StanCon.
Slide 2
Slide 2 text
Intended Audience
• Some experience with the basics of Bayesian statistics.
Slide 3
Slide 3 text
Intended Audience
• Some experience with the basics of Bayesian statistics.
• Some experience using MCMC for research.
Slide 4
Slide 4 text
Intended Audience
• Some experience with the basics of Bayesian statistics.
• Some experience using MCMC for research.
• Have heard of ensemble sampling methods such as
emcee.
Slide 5
Slide 5 text
Bayesian Inference
Slide 6
Slide 6 text
Bayesian Inference
Pr , M =
Pr , M Pr |M
Pr M
Bayes’ Theorem
Slide 7
Slide 7 text
Bayesian Inference
Pr , M =
Pr , M Pr |M
Pr M
Bayes’ Theorem
Parameters
Slide 8
Slide 8 text
Bayesian Inference
Pr , M =
Pr , M Pr |M
Pr M
Bayes’ Theorem
Data
Parameters
Slide 9
Slide 9 text
Bayesian Inference
Pr , M =
Pr , M Pr |M
Pr M
Bayes’ Theorem
Data
Parameters
Model
Slide 10
Slide 10 text
Bayesian Inference
Pr , M =
Pr , M Pr |M
Pr M
Bayes’ Theorem
Slide 11
Slide 11 text
Bayesian Inference
Pr , M =
Pr , M Pr |M
Pr M
Bayes’ Theorem
Prior
Slide 12
Slide 12 text
Bayesian Inference
Pr , M =
Pr , M Pr |M
Pr M
Bayes’ Theorem
Prior
Likelihood
Slide 13
Slide 13 text
Bayesian Inference
Pr , M =
Pr , M Pr |M
Pr M
Bayes’ Theorem
Prior
Likelihood
Posterior
Slide 14
Slide 14 text
Bayesian Inference
Pr , M =
Pr , M Pr |M
Pr M
Bayes’ Theorem
Prior
Likelihood
Posterior
Evidence
Ideal
Metropolis-Hastings ′ = Normal ′ = , = s
Typical Separation
Adaptive
M-H
Slide 44
Slide 44 text
Ensemble Sampling
Slide 45
Slide 45 text
Ensemble Sampling
Slide 46
Slide 46 text
Ensemble Sampling
Slide 47
Slide 47 text
Ensemble Sampling
Slide 48
Slide 48 text
Ensemble Sampling
Slide 49
Slide 49 text
Ensemble Sampling
Slide 50
Slide 50 text
emcee
′ = min 1,
′
−1
~ =
1
from
1
,
0 otherwise
“Stretch” factor
Slide 51
Slide 51 text
Ideal
Typical Separation
emcee
M-H
Slide 52
Slide 52 text
Ideal
Typical Separation
emcee
M-H
emcee
Slide 53
Slide 53 text
Ideal
Typical Separation
emcee
M-H
emcee
Slide 54
Slide 54 text
Ideal
Typical Separation
emcee
M-H
emcee
After weighting by
acceptance probability
Slide 55
Slide 55 text
emcee
′ = min 1,
′
−1
~ =
1
from
1
,
0 otherwise
“Stretch” factor
Slide 56
Slide 56 text
emcee
′ = min 1,
′
−1
~ =
1
from
1
,
0 otherwise
“Stretch” factor
Slide 57
Slide 57 text
Summary
• Volume scales as .
• The posterior density depends on both volume and
amplitude.
• Most of the posterior is concentrated in a “shell”
around the best solution called the typical set.
• MCMC draws samples from the typical set.
Slide 58
Slide 58 text
But what about corner plots?
Slide 59
Slide 59 text
But what about corner plots?
2-dimensional projection
of D-dimensional shell
Slide 60
Slide 60 text
But what about corner plots?
2-dimensional projection
of D-dimensional shell
Slide 61
Slide 61 text
But what about corner plots?
2-dimensional projection
of D-dimensional shell
Slide 62
Slide 62 text
Hamiltonian Monte Carlo
Slide 63
Slide 63 text
Hamiltonian Monte Carlo
Slide 64
Slide 64 text
Hamiltonian Monte Carlo
Slide 65
Slide 65 text
Hamiltonian Monte Carlo
Treat the particle at position q as a point mass
with mass matrix M and momentum p.
Pr , ∝ , = −
−1
2
Hamiltonian
Slide 66
Slide 66 text
Hamiltonian Monte Carlo
Pr , ∝ , = −
−1
2
Treat the particle at position q as a point mass
with mass matrix M and momentum p.
=
= −1
= −
=
ln
Hamiltonian
Hamilton’s Equations
Slide 67
Slide 67 text
Hamiltonian Monte Carlo
′, −′ , = min 1,
Pr ′, −′
Pr ,
∼ Normal = , =
Slide 68
Slide 68 text
Typical Distance
Hamiltonian Monte Carlo
∼ Normal = , =
Slide 69
Slide 69 text
Typical Distance
Hamiltonian Monte Carlo
∼ Normal = , =
Slide 70
Slide 70 text
Ideal
Typical Separation
M-H
emcee
Hamiltonian Monte Carlo ∼ Normal = , =
Slide 71
Slide 71 text
Ideal
Typical Separation
M-H
emcee
Hamiltonian Monte Carlo ∼ Normal = , =
HMC