Published August 9, 2023
| Version v0.2.0
Software
Open
Mici: Manifold Markov chain Monte Carlo methods in Python
Creators
Description
Major release.
Dependency changes
- Dropped support for Python 3.6, 3.7 and 3.8.
- Minimum NumPy version changed to 1.22 per NEP 29.
API changes
- Interface to sampler classes simplified to remove previous
sample_chain
andsample_chains_with_adaptive_warm_up
methods in favour of combining all functions into a singlesample_chains
method, which now requires arguments to be passed specifying both number of warm-up iterations (n_warm_up_iter
, can be zero) and number of main iterations (n_main_iter
). All arguments tosample_chain
other thann_warm_up_iter
,n_main_iter
andinit_states
are now keyword only. metric
and optional arguments specifying derivatives (for examplegrad_neg_log_dens
andjacob_constr
) to system classes are now all keyword only.sample_chains
methods now return named tuples with entriesfinal_states
,traces
andstatistics
.memmap_enabled
keyword argument tosample_chains
removed and replaced withforce_memmap
argument, with adjusted semantics that memory mapping is now always enabled when sampling chain in parallel on multiple processes, withforce_memmap
allowing memory mapping to also be used when sampling a chain or chains on a single process.
Bug fixes
- Bug due to
mici.transitions.Transition.statistic_types
being shared across subclasses as a mutable set fixed. - Accept probabilities now computed using
exp(min(.))
rather thanmin(exp(.))
to improve numerical stability. reverse_norm
argument toConstrainedLeapfrogIntegrator
initializer was previously ignored - this is now fixed.- Usages of deprecated
numpy.bool
type removed.
New, changed and removed features
- Added implicit midpoint integrator (
mici.integrators.ImplicitMidpointIntegrator
) for non-separable Hamiltonian systems, withdh2_dpos
method added toEuclideanMetricSystem
to allow also using with implicit midpoint integrator for testing purposes. - Added family of symmetric composition integrators described in Blanes, Casas, Sanz-Serna (2014).
- Added option to record traces during warm-up (
trace_warm_up
argument tosample_chains
method). - Added new
mici.interop
module with convenience functions for converting Micisample_chains
output to anarviz.InferenceData
object, sampling a PyMC model with Mici and sampling a PyStan model with Mici. - Added new projection solver for use with
ConstrainedLeapfrogIntegrator
which performs a Newton iteration with backtracking line search (mici.solvers.solve_projection_onto_manifold_newton_with_line_search
). - Default for
projection_solver
argument toConstrainedLeapfrogIntegrator
initializer changed tomici.solvers.solve_projection_onto_manifold_newton
. - Step size adapter now allows using custom reducer for combining per-chain adapted step sizes.
- Current step size now recorded in integration transition statistics (with key
step_size
) allowing live monitoring usingmonitor_stats
argument tosample_chains
. - Handling of matrices initialised with non finite values improved with new
mici.errors.LinAlgError
exception being raised. - Automatic chain truncation on keyboard interrupt removed.
- Norm functions now do not explicitly use NumPy API, instead using array methods / operator overloads, to allow using to array-like inputs such as
jax.Array
instances.
Documentation and packaging
- Documentation now built using Sphinx.
- Additional details and references added to docstrings and formatting improved.
- Project metadata now stored in
pyproject.toml
file withsetup.py
script removed.
Notes
Files
matt-graham/mici-v0.2.0.zip
Files
(2.0 MB)
Name | Size | Download all |
---|---|---|
md5:ca30119cd7afc0683c15dfd3f8c495a1
|
2.0 MB | Preview Download |
Additional details
Related works
- Is supplement to
- https://github.com/matt-graham/mici/tree/v0.2.0 (URL)