Changelog¶
All notable changes to this project will be documented in this file.
The format follows Keep a Changelog. Versions correspond to git tags; version numbers follow Semantic Versioning.
Unreleased¶
0.2.0 — 2026-11-11¶
Added¶
- Resampling methods:
resample="smc"(via aspire),"inprior"(draw from the proposal within the prior support, no reweighting) and"emcee". - Multimodal proposals:
n_modes, withmode_searches("hypercube","symmetric","symmetric-polish","multistart"),mode_search_nsamples,mode_search_subspace,mode_separation_sigma,mode_symmetries,mode_symmetry_tol,mode_symmetry_polish_max,mode_multistart_nstartsandmode_weights. Candidates from all searches are pooled and ranked by log-posterior before selection. The mixture is recorded inmeta_data["mode_mixture"], including which search proposed each mode. proposal_covariance:"diagonal"(independent truncated normals) or"full"(the correlated Gaussian restricted to the prior box). Recorded inmeta_data["proposal_covariance"].fisher_method="waveform": the waveform Fisher matrix for gravitational-wave likelihoods, including phase/time/distance-marginalised likelihoods (via the Schur complement, withmarginalized_referenceonLaplacePosteriorEstimator) and detector-based sky frames.map_restarts(default 4): independentdifferential_evolutionruns in the MAP search, keeping the best.map_spike_guard(default True) andmap_spike_delta: reject MAP candidates that sit on a needle spike of the log-posterior.map_vectorized(default True): evaluate thedifferential_evolutionpopulation as one batch, so the MAP search usesnpool.smc_prior_flow,smc_prior_fraction,smc_progressandsmc_plot_everyfor SMC runs.sampling_cov: supply a precomputed covariance.cov_scalingaccepts a per-parameter dict.jacobian_cap_scale,hessian_kwargs,use_unit_cubeandmax_iterationsoptions.- Validation of the Hessian-derived covariance along its principal axes; directions wider than the Gaussian predicts are inflated.
- Checkpoint and resume for the batched resampling methods and SMC.
- Parallel likelihood evaluation through
npool/pool. bilby_laplace.comparison: JSD/EMD comparison of results against a reference, used by the examples.- Examples: gaussian, rosenbrock, BBH_HLV, BNS_3G and AntiGlitch.
Changed¶
resample="inprior"usesproposal_covariance="full"by default; every other method uses"diagonal".- The multiprocessing pool is created before the MAP search.
- A secondary mode with a higher log-posterior than the primary MAP logs a warning.
fail_on_errordefaults to True.- Unit-cube Hessian defaults:
initial_step=0.001,step_factor=2,maxiter=10; the unit-cube precision is floored at the prior precision. - Renamed to reflect that the estimated matrix is the posterior precision, not the Fisher
information:
matrix.py→laplace.py,FisherMatrixPosteriorEstimator→LaplacePosteriorEstimator,calculate_FIM→calculate_posterior_precision,calculate_iFIM→calculate_posterior_covariance. - The
sample_array/sample_dataframesentinel for the expansion point issample="MAP"(was"maxL"); other strings raiseValueError.
Fixed¶
Constraintpriors are applied in the MAP search, Hessian, mode search and Laplace evidence (log_priordelegates toPriorDict.ln_prob; MAP starts usesample_subset_constrained).log_evidence_laplaceincludes bilby's constraint normalisation factor.prior_parameterssubstitution happens before the prior-support test in the SMC and in-prior draws.- Latin hypercube starts that violate a constraint are dropped from the mode search.
- The hypercube mode search keeps the best polish of a region, not the first.
- An exact symmetry mirror is not rejected as a duplicate of its own source by the separation gate.
- The waveform Fisher uses the injection as the marginalised-parameter reference only when
use_injection_for_map=True. - Local MAP polishes wrap periodic parameters instead of treating their bounds as walls.
resample=Nonereports the fraction of draws outside the prior support.- The sampling seed reaches every stage, including SMC.
Removed¶
- The manual finite-difference Hessian fallback and
fd_eps;scipy>=1.15is required. get_maximum_likelihood_sample(), an alias ofget_MAP_sample().- The bounds arguments of
_pool_log_likelihood; support is tested once per batch. - The GW150914 example (needs a data download).
0.1.0 — 2026-03-02¶
Initial release.
Added¶
Fishersampler class — a Bilby plugin that registers asbilby.laplace/laplacevia thebilby.samplersentry-point group.FisherMatrixPosteriorEstimator— computes the MAP estimate and inverse Fisher Information Matrix (iFIM) covariance for a given likelihood and prior.- FIM calculation using
scipy.differentiate.hessian(scipy ≥ 1.15) with automatic finite-difference fallback for older scipy. - Rejection sampling and importance sampling resampling modes.
- Batched sampling loop with a
tqdmprogress bar reporting per-batch efficiency. - Optional corner diagnostic plot (
plot_diagnostic=True) comparing the Gaussian proposal with the resampled posterior. result.meta_data["run_statistics"]populated with sampling efficiency, likelihood evaluation count, and wall-clock time.examples/gaussian_example.py— minimal runnable demo on a 2-D Gaussian likelihood.- Version managed by
setuptools-scmfrom git tags.