Lecture 20 Notes

6 08 1 12 gibbs example 1 05 0 05 1 15 1 05 0 05 1 15

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ), … Proposal Q: ‣ pick a block i uniformly (or round robin, or any other schedule) ‣ sample XB(i) ~ P(XB(i) | X¬B(i)) Gibbs example 0.8 0.6 0.4 0.2 0 0.2 0.4 0.6 0.8 0.8 0.6 0.4 0.2 0 0.2 0.4 0.6 0.8 1 1.2 Gibbs example 1 0.5 0 0.5 1 1.5 1 0.5 0 0.5 1 1.5 Why is Gibbs useful? P (x￿ , x￿ i ) P (xi | x￿ i ) i ¬ ¬ For Gibbs, p = P (xi , x¬i ) P (x￿ | x¬i ) i Gibbs derivation ￿ ￿ P (xi , x¬i ) = = = ￿ x¬i ) P (xi | P (xi , x¬i ) P (x￿ | x¬i ) i P (x￿ , x¬i ) P (xi | x¬i ) i P (xi , x¬i ) P (x￿ | x¬i ) i P (x￿ , x¬i ) P (xi , x¬i )/P (x¬i ) i P (xi , x¬i ) P (x￿ , x¬i )/P (x¬i ) i 1 Gibbs in practice Proof of p=1 means Gibbs is often easy to implement Often works well ‣ if we choose good blocks (but there may be no good blocking!) Fancier version: adaptive blocks, based on current x Gibbs failure example 5 4 3 2 1 0 1 2 3 4 5 6 4 2 0 2 4 6 Sequential sampling In an HMM or DBN, to sample P(XT), start from X1 and sample forward step by step ‣ Xt+1 ~ P(Xt+1 | Xt) P(X1:T) = P(X1) P(X2 | X1) P(X3 | X2) … Particle filter Can sample Xt+1 ~ P(Xt+1 | Xt) using any algorithm from above If we use parallel importance sampling to get N samples at once from each P(Xt), we get a particle filter ‣ also need one more trick: resampling Write xt,i (i = 1…N) for sample at time t Particle filter Want one sample from each of P(Xt+1 | xt,i) Have only Z P(Xt+1 | xt,i) For each i, pick xt+1,i from proposal Q(x) Compute unnormalized importance weight wi = ZP (xt+1,i | xt,i )/Q(xt+1,i ) ˆ Particle filter Normalize weights: 1￿ w= ¯ wi ˆ Ni wi = wi /w ˆ¯ Now, (wi, xt+1,i) is an approximate weighted sample from P(Xt+1) What will happen if we do this for T=1, 2, … ? Resampling To get an unweighted sample, resample Sample N times (with replacement) from xt+1,i with probabilities wi/N ‣ alternately: deterministically take floor(wi) copies of xt+1,i and sample only from fractional part [wi – floor(wi)] Each xt+1,i appears wi times on average, so we’re still a sample from P(Xt+1) Particle filter example Learning Learning Basic learning problem: given some experience, find a new or improved model Experience: a sample x1, …, xN Model: want to predict xN+1, … Example Experience = range sensor readings & odometry from ro...
View Full Document

Ask a homework question - tutors are online