<p><div><div><div><div data-show-faces="false" data-height="21" data-width="100" data-layout="button_count" data-send="true" data-href="https://www.r-bloggers.com/stan-weekly-roundup-25-august-2017/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://andrewgelman.com/2017/08/25/stan-weekly-roundup-25-august-2017/"> R – Statistical Modeling, Causal Inference, and Social Science</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>This week, the entire Columbia portion of the Stan team is out of the office and we didn’t have an in-person/online meeting this Thursday. Mitzi and I are on vacation, and everyone else is either teaching, TA-ing, or attending the <a rel="nofollow" href="http://andrewgelman.com/wp-admin/post-new.php" target="_blank">Stan course</a>. Luckily for this report, there’s been some great activity out of the meeting even if I don’t have a report of what everyone around Columbia has been up to. If a picture’s really worth a thousand words, this is the longest report yet.</p>
<ul>
<li><b>Ari Hartikainen</b> has produced some absolutely beautiful parallel coordinate plots of HMC divergences<sup>*</sup> for multiple parameters. The divergent transitions are shown in green and the lines connect a single draw. The top plot is unnormalized, whereas the bottom scales all parameters to a [0, 1] range.
<p><center><br>
<img alt="Ari's divergence plot" src="https://i0.wp.com/andrewgelman.com/wp-content/uploads/2017/08/ari-divergence-plot.png?w=450" data-recalc-dims="1"><br>
</center></p>
<p>You can follow the ongoing discussion on the <a rel="nofollow" href="http://discourse.mc-stan.org/t/concentration-of-divergences/1590/21" target="_blank">forum thread</a>. There are some further plots for larger models and some comparisons with the pairs plots that Michael Betancourt has been recommending for the same purpose (the problem with pairs is that it’s very very slow, at least in RStan, because it has to draw quadratically many plots).

<li><b>Sebastian Weber</b> has a complete working prototype of the MPI (multi-core parallelization) in place and has some beautiful results to report. The first graph is the speedup he achieved on a 20-core server (all in one box with shared memory):
<p><center><br>
<img alt="Sebasitan's MPI speedup plot" src="https://i1.wp.com/andrewgelman.com/wp-content/uploads/2017/08/sebastian-mpi-speedup.jpg?w=450" data-recalc-dims="1"><br>
</center></p>
<p>The second graph shows what happens when the problem size grows (those bottom numbers on the x-axis are the number of ODE systems being solved, whereas the top number remains the number of cores used).</p>
<p><center><br>
<img alt="Sebastian's weak scaling plot" src="https://i0.wp.com/andrewgelman.com/wp-content/uploads/2017/08/sebastian-weak-scaling.jpg?w=450" data-recalc-dims="1"><br>
</center></p>
<p>As with Ari’s plots, you can follow the ongoing disussion on the <a rel="nofollow" href="http://discourse.mc-stan.org/t/mpi-design-discussion/110" target="_blank">forum thread</a>. And if you know something about MPI, you can even help out. Sebastian’s been asking if anyone who knows MPI would like to check his work—he’s learning it as he goes (and doing a bang-up job of it, I might add!).

<p> </p>
<p><b>These lists are incomplete</b></p>
<p>After doing a handful of these reports, I’m sorry to say you’re only seeing a very biased selection of activity around Stan. For the full story, I’d encourage you to jump onto our forums or GitHub (warning: very high traffic, even if you focus).</p>
<hr>
<p> <sup>*</sup> <small>Divergences in Stan arise when the Hamiltonian, which should be conserved across a trajectory, diverges—it’s basically a numerical simulation problem—if we could perfectly follow the Hamiltonian through complex geometries, there wouldn’t be any divergences. This is a great diagnostic mechanism to signal something’s going wrong and resulting estimates might be biased. It may seem to make HMC more fragile, but the problem is that Gibbs and Metropolis will fail silently in a lot of these situations (though BUGS will often help you out of numerical issues by crashing).</small></p>
<p>The post <a rel="nofollow" href="http://andrewgelman.com/2017/08/25/stan-weekly-roundup-25-august-2017/" target="_blank">Stan Weekly Roundup, 25 August 2017</a> appeared first on <a rel="nofollow" href="http://andrewgelman.com/" target="_blank">Statistical Modeling, Causal Inference, and Social Science</a>.</p>
	<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="http://andrewgelman.com/2017/08/25/stan-weekly-roundup-25-august-2017/"> R – Statistical Modeling, Causal Inference, and Social Science</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a rel="nofollow" href="https://www.r-project.org/" title="The R Project for Statistical Computing">R</a> news and <a rel="nofollow" href="https://www.r-bloggers.com/search/tutorial" title="R tutorials">tutorials</a> on topics such as: <a rel="nofollow" href="https://www.r-bloggers.com/search/data%20science" title="Data science">Data science</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data" title="Big Data">Big Data, <a rel="nofollow" href="https://www.r-users.com/" title="R jobs">R jobs</a>, visualization (<a rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2" title="ggplot and ggplot2 tutorials">ggplot2</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/boxplot" title="Boxplots using lattice and ggplot2 tutorials">Boxplots</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/map" title="Maps and gis">maps</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/animation" title="Animation in R">animation</a>), programming (<a rel="nofollow" href="https://www.r-bloggers.com/search/RStudio" title="RStudio IDE for R">RStudio</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/sweave" title="Sweave and literate programming">Sweave</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX" title="LaTeX in R">LaTeX</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/SQL" title="SQL and databases">SQL</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/eclipse" title="Eclipse IDE for R">Eclipse</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/git" title="git and github, Version Control System">git</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/hadoop" title="Large data in R using Hadoop">hadoop</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping" title="Web Scraping of google, facebook, yahoo, twitter and more using R">Web Scraping</a>) statistics (<a rel="nofollow" href="https://www.r-bloggers.com/search/regression" title="Regressions and ANOVA analysis tutorials">regression</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/PCA" title="principal component analysis tutorial">PCA</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/time+series" title="Time series">time series</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/trading" title="finance trading">trading</a>) and more...
<img width="1" alt="" src="http://feeds.feedburner.com/~r/RBloggers/~4/cJq9-Qeh59I" height="1"></a></div></ul>