Eight Schools, or the importance of model reparameterisation

This is an introduction to NumPyro, using the Eight Schools model as example. Here we demonstrate the effects of model reparameterisation. Reparameterisation is especially important in hierarchical models, where the joint density tend to have high curvatures. 1 2 3 4 5 6 7 8 import numpy as np import jax.numpy as jnp import numpyro import numpyro.distributions as dist from jax import random from numpyro.infer import MCMC, NUTS, Predictive rng_key = random.PRNGKey(0) Here we are using the classic eight schools dataset from Gelman et al. We have collected the test score statistics for eight schools, including the mean and standard error. The goal, is to determine whether some schools have done better than others. Note that since we are working with the mean and standard error of eight different schools, we are actually modeling the statistical analysis resutls of some other people: this is essentially a meta analysis problem. ...

11 min · 2153 words · olivier