`ensemble_init_values`, `ensemble_init_radius`, `num_chains`). `internal_warmup_if_nuts` is now
`num_adapt_if_nuts`. Configurations of 3.x must be updated; PyAETNA stops with the accepted keys.
-**Peak search before every sampler** (`sampling/peaks.py`, which also holds the MAP search of the reports): BFGS
from `peak_search_starts` prior draws, grouped into distinct peaks with their Gaussian (Laplace) approximation,
-**Peak search before every sampler** (`sampling/peaks.py`, which also holds the MAP search of the reports): L-BFGS
and damped Newton steps, in double precision, from `peak_search_starts` prior draws, grouped into distinct peaks with their Gaussian (Laplace) approximation,
saved in `<config>_peaks.json`. NUTS chains and ensemble walkers start from draws of the best peak; NUTS starts with
the peak's curvature as mass matrix and adapts it without NumPyro's regularisation, which spoilt parameters known
far better than 1e-3 (the K2-140 period). `on_multiple_peaks` (`stop` or `continue`) is mandatory: with `stop`,
several significant peaks give one configuration per peak, `<config>_peak<k>.yaml`, with `prior_bounds` isolating
it, and the run stops (exit status 3). `peak_search: false` skips the search (start from a saved peak with
`init_from_peaks`, or from the prior).
`init_from_peaks`, near given values with `init_values`, or from the prior).
-**`sampling.prior_bounds`**: truncate priors to a box, keeping their shape.
-**Runs until converged** (`target_ess`, `max_rhat`) for NUTS and the ensembles.
-**Fixed**: the potential energy and the divergences of NUTS were never recorded during sampling (the batched loop
looked for the kernel under the wrong attribute), so the MAP search of the reports started from chain endpoints.
-**Fixed**: ensemble slice sampling (`ess`) returned its walkers in a new random order at every step (NumPyro's
random split of the ensemble), so a "chain" of the output mixed walkers: its autocorrelation time came out as 1–3
steps whatever the model, and the effective sample sizes and R-hat of every ESS run were meaningless (about 30 times
too optimistic on a 20-parameter Gaussian, whose true autocorrelation time is 37 steps). The split stays random;
the walkers are put back in their places. The posterior draws themselves were valid.
-**Fixed**: an ensemble started from given positions drew a whole block of `checkpoint_interval` steps in its
one-step compilation pilot, uncounted, so runs were longer than requested and the log counted draws wrongly.
-**Faster long runs**: the draws grow in place instead of being copied at every block, the checkpoint is written
after a block at most every 5 minutes instead of at every block, and the convergence test of the ensembles thins
the chains by up to a quarter of the autocorrelation time. On a 148-walker, 50 000-step AIES run these overheads
took as long as the sampling. The end-of-run diagnostics skip vector sites (transit times), whose ESS computation
ran that run out of memory (80 GB).
-**Fixed**: along directions where the curvature of a peak is negative or nearly zero, its Gaussian approximation
was up to 10⁶ times wider than along the narrowest one; NUTS chains of the 106-parameter TTV benchmark started
far apart and one of them never moved. The width is now set by the absolute curvature, at most 1000 times the
narrowest. The log warns when a run reaches its maximum length without converging.
Changes for README.md: 1 added line, 0 removed lines.
Original line number
Diff line number
Diff line
@@ -172,6 +172,7 @@ Comprehensive documentation is available:
-**Log (`<config>_run.log`)**: the record of the run: provenance and device, data and priors, the sampler's progress, the posterior summary with R-hat and effective sample sizes (or the Bayesian evidence), goodness of fit, derived quantities, warnings and the BibTeX entries to cite. **[Reading the run log](docs/outputs/run_log.md)** goes through it block by block and lists what to check first.
-**Results (`<config>_results.json`)**: the run settings (sampler, device, precision, chains, draws, seed), the provenance (code revision, package versions), R-hat and ESS for every parameter, the fixed parameters, the MAP, the goodness of fit (χ², maximum likelihood, AIC, AICc, BIC), the nested-sampling evidence, the instruments and the configuration.
-**Peaks (`<config>_peaks.json`)**: the peaks of the posterior found by the peak search before sampling, best first: energy, maximum log-likelihood, approximate (Laplace) evidence and weight, whether the peak is significant, position and widths of the parameters, and its Gaussian approximation (`z`, `cov`), from which a later run can start (`sampling.init_from_peaks`). With several significant peaks and `sampling.on_multiple_peaks: stop`, the run stops here and writes one configuration per peak, `<config>_peak<k>.yaml`, next to the original ([details](docs/config/sampling.md#the-peak-search-all-samplers)).
-**Posterior samples (`<config>_samples.npz`)**: one array per parameter, shaped `(chain, draw)`, and the `potential_energy` of every draw when the sampler records it (NUTS, nested sampling).
-**Model components (`<config>_components.npz`)**: the data (`bjd`, `y`, `dy`, `instrument`, `visit`) and, on every data point, the MAP model and its components (`map/total`, `map/planet`, `map/gp_mean`, …), the posterior median (`median/…`) and the 16th–84th percentile band (`q16_84/…`).
-**Report (`<config>_report.pdf`)** and, with a `physics:` section, **physics report (`<config>_physics.pdf`)**: phase-folded fits, residuals, corner plots and derived quantities. **[Reading the PDF reports](docs/outputs/report.md)** shows an example of every page and how to read it.
<divclass="help">Instead of a saved peak: start near these values, one per free parameter (by the names of the samples file), as codes such as allesfitter start their walkers. Not together with <code>init_from_peaks</code>.</div>
<divclass="help">Half-width of the uniform ball around <code>init_values</code>, in the sampler's unbounded coordinates. Default: <code>1e-4</code>.</div>
<divclass="help">A secondary peak counts as significant when its approximate evidence is at least this fraction of the best peak's. Default: 0.001.</div>
<divclass="help">Truncate the priors of these free parameters to <code>[low, high]</code>, keeping their shape: one peak of a posterior with several. The configurations written by <code>on_multiple_peaks: stop</code> set it for each peak.</div>
<inputtype="number"id="m-tess"data-key="target_ess"data-emit="set"placeholder="(run the given number of draws)"min="1"step="1">
<divclass="help">Run until the slowest parameter has this many independent draws and the chains agree (R-hat ≤<code>max_rhat</code>, default 1.01), at most <code>num_samples_if_*</code> draws. For an ensemble, the run must also exceed 50 autocorrelation times.</div>
<divclass="help">Save checkpoint every N samples. Allows resuming interrupted runs. Required for every sampler.</div>
<divclass="help">Draws per block for NUTS and the ensembles: progress (and, with <code>target_ess</code>, the convergence test) is reported after each block, and the checkpoint, which allows resuming interrupted runs, is written after a block at most every 5 minutes. Required for every sampler; nested sampling checkpoints every minute on its own.</div>