One thing that you’ll often find when using exoplanet (and PyMC or other libraries for gradient-based inference) is that performance of your inference can be quite sensitive to the parameterization of your problem. For example, you might see warnings from PyMC telling you to consider reparameterizing your model (because of divergences) or (worse!) you might find that sampling is unreasonably slow or the number of effective samples is very small. These issues can almost always be solved by investigating any sources of non-linear degeneracies between parameters in your model or heavy tails in the posterior density.

The Stan User’s Guide includes some general advice about reparameterization that can be a useful place to start, but I’ve found that the best choices tend to be pretty problem specific. Throughout these tutorials and the Case Studies we have tried to select sensible parameterizations (sometimes after many experiments) and comment wherever we’ve chosen something non-standard.

Some of the trickiest parameters are things like orbital eccentricity, inclination, and other angles. In the case of eccentricity, you can sometimes reparameterize in terms of an observable (such as transit duration, see the “Quick fits for TESS light curves” case study). For angles it can sometimes be better to parameterize in terms of sums or differences of pairs of angles (see the example at Astrometry for a demo).

As I learn more general advice for reparameterization of exoplanet models, I’ll try to keep this page updated, but in the meantime, feel free to start a “discussion” on the GitHub repository if you discover a particularly good or tricky parameterization problem.