Skip to main content

Module nuts

Module nuts 

Source
Expand description

No-U-Turn Sampler (NUTS) — Hoffman & Gelman (2014) with multinomial sampling (Betancourt 2017).

This follows the same algorithm used by PyMC and Stan:

  • Iterative tree doubling (extend trajectory forward or backward)
  • Generalized U-turn criterion on subtrees
  • Multinomial candidate selection weighted by exp(-H)
  • Divergence detection via energy error threshold
  • Max tree depth cap (default 10)

Structs§

NutsConfig

Functions§

run_chain
Run a single NUTS chain with windowed diagonal mass matrix adaptation.