Published June 30, 2020
| Version v0.1.6
Software
Open
matt-graham/mici: v0.1.6
Description
New features and efficiency improvements
- Added framework for adaptation of transition parameters via classes in new
mici.adapters
module and associatedsample_chains_with_adaptive_warm_up
methods added to sampler classes. Initial adapters implemented are a dual averaging step size adapter, a diagonal metric adapter based on estimated variances and dense metric adapter based on estimated covariance matrices. - New labelled sequence progress bar implementation to use with adaptive sampling chains and generalisation of progress bars to allow wrapping arbitrary sequences.
- Improved matrix operation efficiency. Repeated calls to matrix constructors avoided by caching matrices constructed by
transpose
/sqrt
/inv
methods and explicit matrix-vector multiplies used for inverted factored definite matrices to avoid bottleneck ofscipy.linalg.solve_triangular
which is much slower than a direct matrix-vector multiply. - Remove redundant recaluclation of product of momentum and inverse metric when calculating value and gradient of
h2
Hamiltonian component.
Bug fixes
- Non-display of progress bars when running on Google Colab fixed.
Backwards incompatible changes
- Previously
ExplicitLeapfrogIntegrator
was aliased toLeapfrogIntegrator
.ExplicitLeapfrogIntegrator
has now been renamed toLeapfrogIntegrator
with no aliases. - The dictionaries of chain statistics returned by
sample_chain
andsample_chains
call no longer contain anhamiltonian
key. Instead by default thetraces
dictionary returned by these methods includes ahamiltonian
entry (as generated by the default trace function used when a custom list of trace functions are not specified by thetrace_funcs
keyword argument). The rationale for this change is to standardize the chain statistics dictionary as only including values which don't correspond directly to a function of the chain states at the end of each iteration but instead generally depend on the whole transition, with thetrace_funcs
keyword argument already allowing recording of quantities outside this category. - The dictionaries of chain statistics returned by
sample_chain
andsample_chains
call no longer contain anaccept_prob
key due to the ambiguity of its meaning and differing usage in the static Metropolis and dynamic HMC integration transitions. Both classes of transitions now return aaccept_stat
statistic in the statistics dictionary, this corresponding to an overall measure of the probability of accepting a move both due to non-zero changes in the Hamiltonian over a trajectory and any early termination of trajectories due to convergence errors or non-reversible steps when using an implicit integrator. This single summary statistic is intended to both provide a quick summary of sampling performance e.g. in the monitored statistics in chain progress bars, and as the default target for adaptation of the integrator step size. Individual transitions also provide additional acceptance probability related statistics with differing meanings. The dynamic integration transitions (subclasses ofDynamicIntegrationTransition
and correspondingDynamic*HMC
sampler classes) additionally return anav_metrop_accept_prob
statistic which is the average Metropolis acceptance probability for a move from the initial state to each of the states on the whole trajectory tree built (including subtrees which are invalid under the no-U-turn criteria); this does not include any adjustment for early termination of trajectories due to convergence errors / non-reversible steps in implicit integrators so should be used with caution in such cases. The Metropolis integration transitions (subclasses ofMetropolisIntegrationTransition
and corresponding*MetropolisHMC
sampler classes) additionally return ametrop_accept_prob
statistic which is the Metropolis acceptance probability of the move proposed by the transition without any adjustment for rejection due to convergence errors / non-reversible steps in implicit integrators. - Documentation, internal naming and API has been standardized to use -ize rather than -ise endings. The only public facing change outside of the documentation is the renaming of
mici.systems.SoftAbsRegularisedPositiveDefiniteMatrix
tomici.systems.SoftAbsRegularizedPositiveDefiniteMatrix
.
Files
matt-graham/mici-v0.1.6.zip
Files
(4.2 MB)
Name | Size | Download all |
---|---|---|
md5:dd447c615db3138817eaa70e943c43ba
|
4.2 MB | Preview Download |
Additional details
Related works
- Is supplement to
- https://github.com/matt-graham/mici/tree/v0.1.6 (URL)