Skip to main content

Come analyze HEASARC, IRSA, and MAST data in the cloud! The Fornax Initiative is now welcoming all interested beta users.

Xspec Home Page

Goodman–Weare (chain type gw)

The Goodman–Weare (GW) ensemble sampler advances many walkers in parallel by “stretch moves”: each walker proposes a new position on the line connecting it to another randomly selected walker. The key property is that GW is invariant under affine transformations of the parameter space, so it does not suffer from anisotropic or correlated posteriors the way MH does. GW is the default chain type in XSPEC; in the broader Bayesian community it is the basis of the popular emcee sampler.

Strengths.    GW is essentially tuning-free. The user chooses only the number of walkers (typically $2D$ to $4D$ where $D$ is the number of free parameters) and the length of the chain; there is no proposal scale to set. It handles correlated and moderately skewed posteriors much better than MH for the same elapsed-time budget. The walker updates are independent within each half-step, so XSPEC can fan them out across multiple processes via parallel walkers.

Weaknesses.    GW relies on the ensemble spanning the posterior. If walkers are initialized in the wrong basin the algorithm can get stuck visiting only that basin; a strongly multimodal posterior is the worst case. The per-step cost is one likelihood per walker, so GW with a few dozen walkers does many more likelihood evaluations per step than MH; the per-step elapsed time is correspondingly higher.

Tips.    Initialize the walkers by fitting first so the covariance-based initialization is used; the alternative (uniform initialization with width ten times the parameter newpar delta) is wasteful unless you genuinely have no starting point. With parallel walkers $> 1$, the walkers parameter should divide evenly by the number of parallel worker processes for best load balance.