Interactive visualizations of sampling and GP regression

You really don’t want to miss Chi Feng‘s absolutely wonderful interactive demos.

(1) Markov chain Monte Carlo sampling

I believe this is exactly what Andrew was asking for a few Stan meetings ago:

This tool lets you explore a range of sampling algorithms including random-walk Metropolis, Hamiltonian Monte Carlo, and NUTS operating over a range of two-dimensional distributions (standard normal, banana, donut, multimodal, and one squiggly one). You can control both the settings of the algorithms and the settings of the visualizations. As you run it, it even collects the draws into a sample which it summarizes as marginal histograms.

Source code

The demo is implemented in Javascript with the source code on Chi Feng’s GitHub organization:

Wish list

  1. 3D (glasses or virtual reality headset)
  2. multiple chains in parallel
  3. scatterplot breadcrumbs
  4. Gibbs sampler
  5. Ensemble samplers
  6. User-pluggable densities (Andrew really wants this for Stan where you’d choose two dimensions of N to visualize)

(2) Gaussian Process visualization

This one’s also really elegant.

It lets you lay down a few points and fit a 1D GP. It lets you choose kernel and hperparameters, and even sample regression functions from it conditioned on the data you provide.

Wish list

  1. 3D (OK, I’m obssesed, but this one would be great on a 2D grid with a 3D visualization of a GP being fit)
  2. Estimating hyperparameters (didn’t seem like it was doing this—may be a bit challenging for Javascript!)

Source code

9 thoughts on “Interactive visualizations of sampling and GP regression

Leave a Reply to Umberto Cancel reply

Your email address will not be published. Required fields are marked *