Comments on: Parallel Tempering in R with Rmpi http://www.lindonslog.com/mathematics/parallel-tempering-r-rmpi/ Sun, 27 Nov 2016 15:23:00 +0000 hourly 1 https://wordpress.org/?v=4.6.1 By: admin http://www.lindonslog.com/mathematics/parallel-tempering-r-rmpi/#comment-683 Wed, 22 Oct 2014 16:42:51 +0000 http://www.lindonslog.com/?p=883#comment-683 A good rule of thumb is to use a geometric temperature ladder between your desired maximum and minimum temperature. The more processors you have the finer you can make this discrete temperature ladder, if you only have a few processors, then the difference in temperature between processors can be too large to get a good acceptance ratio. I recall a paper saying that for best results you should attempt to swap at each iteration… I’m not sure, attempting swaps requires communication and can be a computational burden. For the metropolis hastings within a single processor acceptance ratio should be around 40%, for the metropolis hastings between processors that is anothing thing – some people measure the performance of parallel tempering by the time it takes to get from the bottom temperature to the top temperature and back down again. If you have a lot of processors/temperatures the acceptance ratio is high but then there are more temperatures to traverse through… finding a good balance is key. There are adaptive ways but it requires a lot of effort.

]]>
By: Yuriy http://www.lindonslog.com/mathematics/parallel-tempering-r-rmpi/#comment-680 Mon, 20 Oct 2014 06:02:58 +0000 http://www.lindonslog.com/?p=883#comment-680 Hi Michael,
thanks for this tutorial. Could you please share your thoughts on how to choose the number of temperatures (chains), and how to choose swap.interval? Is there an adaptive way to do it, e.g., matching the swap acceptance rate to some target values?

]]>
By: Manuela http://www.lindonslog.com/mathematics/parallel-tempering-r-rmpi/#comment-126 Thu, 21 Nov 2013 14:50:42 +0000 http://www.lindonslog.com/?p=883#comment-126 Right – the same thing seems to have happened with the code in my comment. Weird!

It should read “prop[ c ]” rather than “prop” (i.e. access only the c-th element of the vector prop), but WordPress has somehow removed the “[ c ]”.

]]>
By: admin http://www.lindonslog.com/mathematics/parallel-tempering-r-rmpi/#comment-125 Thu, 21 Nov 2013 13:50:49 +0000 http://www.lindonslog.com/?p=883#comment-125 Manuela,
vielen Dank für die Bemerkung! Sie haben recht, da sollte kein “1” stehen. Bitte schau Ihnen mal dieses Bildschirmfoto an:
http://www.lindonslog.com/wp-content/uploads/2013/11/Screenshot-from-2013-11-21-080616.png
so sollte der Quelltext aussehen und komischerweise so steht es auch in meinem Editor :/ Anscheinend verwandelt WordPress das “c” zu einem “1”.
Ich suche nach eine Lösung 🙂

]]>
By: Manuela http://www.lindonslog.com/mathematics/parallel-tempering-r-rmpi/#comment-124 Wed, 20 Nov 2013 23:37:19 +0000 http://www.lindonslog.com/?p=883#comment-124 Dear Michael, thanks for this great tutorial! Very nice intro to parallel tempering with Rmpi.

The code for the temper() function seems to have a tiny typo though: in line 22 it should read
for(c in 1:length(prop)) prop=theta[t-1,c]+rnorm(1,0,0.1);
rather than
for(c in 1:length(prop)) prop1=theta[t-1,c]+rnorm(1,0,0.1);

After changing this, the example code worked beautifully! Keep up the good work! 🙂

]]>