10.07.2015 Views

Information Theory, Inference, and Learning ... - Inference Group

Information Theory, Inference, and Learning ... - Inference Group

Information Theory, Inference, and Learning ... - Inference Group

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Copyright Cambridge University Press 2003. On-screen viewing permitted. Printing not permitted. http://www.cambridge.org/0521642981You can buy this book for 30 pounds or $50. See http://www.inference.phy.cam.ac.uk/mackay/itila/ for links.378 29 — Monte Carlo MethodsGiven: a current point X <strong>and</strong> a height Y = P ∗ (X) × Uniform(0, 1) ≤ P ∗ (X)1: U := r<strong>and</strong>bits(b) Define a r<strong>and</strong>om translation U of the binary coordinatesystem.2: set l to a value l ≤ b Set initial l-bit sampling range.3: do {4: N := r<strong>and</strong>bits(l) Define a r<strong>and</strong>om move within the current interval ofwidth 2 l .5: X ′ := ((X − U) ⊕ N) + U R<strong>and</strong>omize the lowest l bits of X (in the translatedcoordinate system).6: l := l − 1 If X ′ is not acceptable, decrease l <strong>and</strong> try again7: } until (X ′ = X) or (P ∗ (X ′ ) ≥ Y ) with a smaller perturbation of X; termination at orbefore l = 0 is assured.The translation U is introduced to avoid permanent sharp edges, wherefor example the adjacent binary integers 0111111111 <strong>and</strong> 1000000000 wouldotherwise be permanently in different sectors, making it difficult for X to movefrom one to the other.The sequence of intervals from which the new c<strong>and</strong>idate points are drawnis illustrated in figure 29.18. First, a point is drawn from the entire interval,shown by the top horizontal line. At each subsequent draw, the interval ishalved in such a way as to contain the previous point X.If preliminary stepping-out from the initial range is required, step 2 abovecan be replaced by the following similar procedure:2a: set l to a value l < b l sets the initial width2b: do {2c: N := r<strong>and</strong>bits(l)2d: X ′ := ((X − U) ⊕ N) + U2e: l := l + 12f: } until (l = b) or (P ∗ (X ′ ) < Y )0 B−1XFigure 29.18. The sequence ofintervals from which the newc<strong>and</strong>idate points are drawn.These shrinking <strong>and</strong> stepping out methods shrink <strong>and</strong> exp<strong>and</strong> by a factorof two per evaluation. A variant is to shrink or exp<strong>and</strong> by more than one biteach time, setting l := l ± ∆l with ∆l > 1. Taking ∆l at each step from anypre-assigned distribution (which may include ∆l = 0) allows extra flexibility.Exercise 29.11. [4 ] In the shrinking phase, after an unacceptable X ′ has beenproduced, the choice of ∆l is allowed to depend on the difference betweenthe slice’s height Y <strong>and</strong> the value of P ∗ (X ′ ), without spoiling the algorithm’svalidity. (Prove this.) It might be a good idea to choose a largervalue of ∆l when Y − P ∗ (X ′ ) is large. Investigate this idea theoreticallyor empirically.A feature of using the integer representation is that, with a suitably extendednumber of bits, the single integer X can represent two or more realparameters – for example, by mapping X to (x 1 , x 2 , x 3 ) through a space-fillingcurve such as a Peano curve. Thus multi-dimensional slice sampling can beperformed using the same software as for one dimension.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!