Markov Chain Monte Carlo 10701 Recitation Pengtao Xie

  • Slides: 25
Download presentation
Markov Chain Monte Carlo 10701 Recitation Pengtao Xie 2/28/2021 1

Markov Chain Monte Carlo 10701 Recitation Pengtao Xie 2/28/2021 1

Outline • Sampling Methods • Rejection Sampling • Importance Sampling • MCMC Sampling 2/28/2021

Outline • Sampling Methods • Rejection Sampling • Importance Sampling • MCMC Sampling 2/28/2021 2

Outline • Sampling Methods • Rejection Sampling • Importance Sampling • MCMC Sampling 2/28/2021

Outline • Sampling Methods • Rejection Sampling • Importance Sampling • MCMC Sampling 2/28/2021 3

How to represent a distribution • Closed form representation – Gaussian distribution, Dirichlet distribution,

How to represent a distribution • Closed form representation – Gaussian distribution, Dirichlet distribution, Multinomial distribution • Sample based representation – Draw samples from the distribution and use samples to compute expectation, variance, etc 2/28/2021 4

Outline • Sampling Methods • Rejection Sampling • Importance Sampling • MCMC Sampling 2/28/2021

Outline • Sampling Methods • Rejection Sampling • Importance Sampling • MCMC Sampling 2/28/2021 5

May reject a lot of samples 2/28/2021 6

May reject a lot of samples 2/28/2021 6

Outline • Sampling Methods • Rejection Sampling • Importance Sampling • MCMC Sampling 2/28/2021

Outline • Sampling Methods • Rejection Sampling • Importance Sampling • MCMC Sampling 2/28/2021 7

Importance sampling Drawback: hard to find a Q which matches well with P, may

Importance sampling Drawback: hard to find a Q which matches well with P, may give little importance to most samples 2/28/2021 8

Outline • Sampling Methods • Rejection Sampling • Importance Sampling • MCMC Sampling 2/28/2021

Outline • Sampling Methods • Rejection Sampling • Importance Sampling • MCMC Sampling 2/28/2021 9

Markov Chain Monte Carlo Sampling • Motivation – In rejection sampling and importance sampling,

Markov Chain Monte Carlo Sampling • Motivation – In rejection sampling and importance sampling, Q is fixed. May reject or give little importance to most samples • Idea – Use an adaptive Q • Methods – Metropolis-Hastings – Gibbs sampling 2/28/2021 10

2/28/2021 11

2/28/2021 11

2/28/2021 12

2/28/2021 12

2/28/2021 13

2/28/2021 13

2/28/2021 14

2/28/2021 14

2/28/2021 15

2/28/2021 15

2/28/2021 16

2/28/2021 16

2/28/2021 17

2/28/2021 17

2/28/2021 18

2/28/2021 18

2/28/2021 19

2/28/2021 19

2/28/2021 20

2/28/2021 20

2/28/2021 21

2/28/2021 21

2/28/2021 22

2/28/2021 22

2/28/2021 23

2/28/2021 23

Summary Is distribution Q adaptive? NO YES Is accept rate 1? NO Rejection Sampling

Summary Is distribution Q adaptive? NO YES Is accept rate 1? NO Rejection Sampling 2/28/2021 Is accept rate 1? YES Importance Sampling NO MH YES Gibbs Sampling 24

References • Slides courtesy – Professor Eric Xing, 10708 Graphical Models – http: //www.

References • Slides courtesy – Professor Eric Xing, 10708 Graphical Models – http: //www. cs. cmu. edu/~epxing/Class/10708/lectures/lecture 16 -MC. pdf – http: //www. cs. cmu. edu/~epxing/Class/10708/lectures/lecture 17 -MCMC. pdf • MCMC theory – http: //www. cs. cmu. edu/~epxing/Class/10708/lectures/lecture 17 -MCMC. pdf Slides 15 -21 2/28/2021 25