Skip to content

Commit

Permalink
Updating version number and docs for new release
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-graham committed May 7, 2020
1 parent be3c4cd commit 8021f55
Show file tree
Hide file tree
Showing 16 changed files with 5,335 additions and 1,053 deletions.
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,6 @@ packages provide extra functionality and features
wider range of types, including of Autograd generated functions. Both
Autograd and multiprocess can be installed alongside Mici by running `pip
install mici[autodiff]`.
* [RandomGen](https://github.com/bashtage/randomgen): if RandomGen is
available the `randomgen.Xorshift1024` random number generator will be used
when running multiple chains in parallel, with the `jump` method of the
object used to reproducibly generate independent substreams. RandomGen can
be installed alongside Mici by running `pip install mici[randomgen]`.
* [ArviZ](https://arviz-devs.github.io/arviz/index.html#): if ArviZ is
available outputs of a sampling run can be converted to an
`arviz.InferenceData` container object using
Expand Down Expand Up @@ -162,12 +157,16 @@ symplectic integrators for Hamiltonian dynamics
[`mici.samplers`](https://matt-graham.github.io/mici/docs/samplers.html) - MCMC
samplers for peforming inference

* `StaticMetropolisHMC` - Static integration time Hamiltonian Monte Carlo
* `StaticMetropolisHMC` - static integration time Hamiltonian Monte Carlo
with Metropolis accept step ([Duane et al., 1987](duane1987hybrid)),
* `RandomMetropolisHMC` - Random integration time Hamiltonian Monte Carlo
* `RandomMetropolisHMC` - random integration time Hamiltonian Monte Carlo
with Metropolis accept step ([Mackenzie, 1989](#mackenzie1989improved)),
* `DynamicMultinomialHMC` - Dynamic integration time Hamiltonian Monte Carlo
with multinomial sampling from trajectory
* `DynamicSliceHMC` - dynamic integration time Hamiltonian Monte Carlo
with slice sampling from trajectory, equivalent to the original 'NUTS' algorithm
([Hoffman and Gelman, 2014](#hoffman2014nouturn)).
* `DynamicMultinomialHMC` - dynamic integration time Hamiltonian Monte Carlo
with multinomial sampling from trajectory, equivalent to the current default
MCMC algorithm in [Stan](https://mc-stan.org/)
([Hoffman and Gelman, 2014](#hoffman2014nouturn);
[Betancourt, 2017](#betancourt2017conceptual)).

Expand Down
8 changes: 4 additions & 4 deletions docs/docs/autodiff.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.7.1" />
<meta name="generator" content="pdoc 0.7.2.dev0+g1b644f6.d20200507" />
<title>mici.autodiff API documentation</title>
<meta name="description" content="Automatic differentation fallback for constructing derivative functions." />
<link href='https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.0/normalize.min.css' rel='stylesheet'>
Expand Down Expand Up @@ -47,7 +47,7 @@ <h1 class="title">Package <code>mici.autodiff</code></h1>
<details class="source">
<summary>
<span>Expand source code</span>
<a href="https://github.com/matt-graham/mici/blob/02ffeebea97e67a5f32844d7f81a3262956f7580/mici/autodiff.py#L0-L58" class="git-link">Browse git</a>
<a href="https://github.com/matt-graham/mici/blob/be3c4cd91f60faf5182ee5704e8e9e61e5dc5b23/mici/autodiff.py#L0-L58" class="git-link">Browse git</a>
</summary>
<pre><code class="python">&#34;&#34;&#34;Automatic differentation fallback for constructing derivative functions.&#34;&#34;&#34;

Expand Down Expand Up @@ -148,7 +148,7 @@ <h2 id="returns">Returns</h2>
<details class="source">
<summary>
<span>Expand source code</span>
<a href="https://github.com/matt-graham/mici/blob/02ffeebea97e67a5f32844d7f81a3262956f7580/mici/autodiff.py#L30-L59" class="git-link">Browse git</a>
<a href="https://github.com/matt-graham/mici/blob/be3c4cd91f60faf5182ee5704e8e9e61e5dc5b23/mici/autodiff.py#L30-L59" class="git-link">Browse git</a>
</summary>
<pre><code class="python">def autodiff_fallback(diff_func, func, diff_op_name, name):
&#34;&#34;&#34;Generate derivative function automatically if not provided.
Expand Down Expand Up @@ -190,7 +190,7 @@ <h2 id="returns">Returns</h2>
</main>
<footer id="footer">
Copyright © 2019 Matt Graham
<p>Generated by <a href="https://pdoc3.github.io/pdoc"><cite>pdoc</cite> 0.7.1</a>.</p>
<p>Generated by <a href="https://pdoc3.github.io/pdoc"><cite>pdoc</cite> 0.7.2.dev0+g1b644f6.d20200507</a>.</p>
</footer>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad(); hljs.configure({languages: ["python"]});</script>
Expand Down
16 changes: 8 additions & 8 deletions docs/docs/autograd_wrapper.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.7.1" />
<meta name="generator" content="pdoc 0.7.2.dev0+g1b644f6.d20200507" />
<title>mici.autograd_wrapper API documentation</title>
<meta name="description" content="Additional autograd differential operators." />
<link href='https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.0/normalize.min.css' rel='stylesheet'>
Expand Down Expand Up @@ -51,7 +51,7 @@ <h1 class="title">Package <code>mici.autograd_wrapper</code></h1>
<details class="source">
<summary>
<span>Expand source code</span>
<a href="https://github.com/matt-graham/mici/blob/02ffeebea97e67a5f32844d7f81a3262956f7580/mici/autograd_wrapper.py#L0-L124" class="git-link">Browse git</a>
<a href="https://github.com/matt-graham/mici/blob/be3c4cd91f60faf5182ee5704e8e9e61e5dc5b23/mici/autograd_wrapper.py#L0-L124" class="git-link">Browse git</a>
</summary>
<pre><code class="python">&#34;&#34;&#34;Additional autograd differential operators.&#34;&#34;&#34;

Expand Down Expand Up @@ -195,7 +195,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
<details class="source">
<summary>
<span>Expand source code</span>
<a href="https://github.com/matt-graham/mici/blob/02ffeebea97e67a5f32844d7f81a3262956f7580/mici/autograd_wrapper.py#L24-L33" class="git-link">Browse git</a>
<a href="https://github.com/matt-graham/mici/blob/be3c4cd91f60faf5182ee5704e8e9e61e5dc5b23/mici/autograd_wrapper.py#L24-L33" class="git-link">Browse git</a>
</summary>
<pre><code class="python">@_wrapped_unary_to_nary
def grad_and_value(fun, x):
Expand All @@ -220,7 +220,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
<details class="source">
<summary>
<span>Expand source code</span>
<a href="https://github.com/matt-graham/mici/blob/02ffeebea97e67a5f32844d7f81a3262956f7580/mici/autograd_wrapper.py#L36-L53" class="git-link">Browse git</a>
<a href="https://github.com/matt-graham/mici/blob/be3c4cd91f60faf5182ee5704e8e9e61e5dc5b23/mici/autograd_wrapper.py#L36-L53" class="git-link">Browse git</a>
</summary>
<pre><code class="python">@_wrapped_unary_to_nary
def jacobian_and_value(fun, x):
Expand Down Expand Up @@ -262,7 +262,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
<details class="source">
<summary>
<span>Expand source code</span>
<a href="https://github.com/matt-graham/mici/blob/02ffeebea97e67a5f32844d7f81a3262956f7580/mici/autograd_wrapper.py#L56-L78" class="git-link">Browse git</a>
<a href="https://github.com/matt-graham/mici/blob/be3c4cd91f60faf5182ee5704e8e9e61e5dc5b23/mici/autograd_wrapper.py#L56-L78" class="git-link">Browse git</a>
</summary>
<pre><code class="python">@_wrapped_unary_to_nary
def mhp_jacobian_and_value(fun, x):
Expand Down Expand Up @@ -300,7 +300,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
<details class="source">
<summary>
<span>Expand source code</span>
<a href="https://github.com/matt-graham/mici/blob/02ffeebea97e67a5f32844d7f81a3262956f7580/mici/autograd_wrapper.py#L81-L99" class="git-link">Browse git</a>
<a href="https://github.com/matt-graham/mici/blob/be3c4cd91f60faf5182ee5704e8e9e61e5dc5b23/mici/autograd_wrapper.py#L81-L99" class="git-link">Browse git</a>
</summary>
<pre><code class="python">@_wrapped_unary_to_nary
def hessian_grad_and_value(fun, x):
Expand Down Expand Up @@ -342,7 +342,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
<details class="source">
<summary>
<span>Expand source code</span>
<a href="https://github.com/matt-graham/mici/blob/02ffeebea97e67a5f32844d7f81a3262956f7580/mici/autograd_wrapper.py#L102-L125" class="git-link">Browse git</a>
<a href="https://github.com/matt-graham/mici/blob/be3c4cd91f60faf5182ee5704e8e9e61e5dc5b23/mici/autograd_wrapper.py#L102-L125" class="git-link">Browse git</a>
</summary>
<pre><code class="python">@_wrapped_unary_to_nary
def mtp_hessian_grad_and_value(fun, x):
Expand Down Expand Up @@ -378,7 +378,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
</main>
<footer id="footer">
Copyright © 2019 Matt Graham
<p>Generated by <a href="https://pdoc3.github.io/pdoc"><cite>pdoc</cite> 0.7.1</a>.</p>
<p>Generated by <a href="https://pdoc3.github.io/pdoc"><cite>pdoc</cite> 0.7.2.dev0+g1b644f6.d20200507</a>.</p>
</footer>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad(); hljs.configure({languages: ["python"]});</script>
Expand Down
113 changes: 104 additions & 9 deletions docs/docs/errors.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.7.1" />
<meta name="generator" content="pdoc 0.7.2.dev0+g1b644f6.d20200507" />
<title>mici.errors API documentation</title>
<meta name="description" content="Exception types." />
<link href='https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.0/normalize.min.css' rel='stylesheet'>
Expand Down Expand Up @@ -34,6 +34,9 @@
<li><h3><a href="#header-classes">Classes</a></h3>
<ul>
<li>
<h4><code><a title="mici.errors.Error" href="#mici.errors.Error">Error</a></code></h4>
</li>
<li>
<h4><code><a title="mici.errors.IntegratorError" href="#mici.errors.IntegratorError">IntegratorError</a></code></h4>
</li>
<li>
Expand All @@ -42,6 +45,12 @@ <h4><code><a title="mici.errors.NonReversibleStepError" href="#mici.errors.NonRe
<li>
<h4><code><a title="mici.errors.ConvergenceError" href="#mici.errors.ConvergenceError">ConvergenceError</a></code></h4>
</li>
<li>
<h4><code><a title="mici.errors.LinAlgError" href="#mici.errors.LinAlgError">LinAlgError</a></code></h4>
</li>
<li>
<h4><code><a title="mici.errors.HamiltonianDivergenceError" href="#mici.errors.HamiltonianDivergenceError">HamiltonianDivergenceError</a></code></h4>
</li>
</ul>
</li>
</ul>
Expand All @@ -55,12 +64,16 @@ <h1 class="title">Package <code>mici.errors</code></h1>
<details class="source">
<summary>
<span>Expand source code</span>
<a href="https://github.com/matt-graham/mici/blob/02ffeebea97e67a5f32844d7f81a3262956f7580/mici/errors.py#L0-L12" class="git-link">Browse git</a>
<a href="https://github.com/matt-graham/mici/blob/be3c4cd91f60faf5182ee5704e8e9e61e5dc5b23/mici/errors.py#L0-L24" class="git-link">Browse git</a>
</summary>
<pre><code class="python">&#34;&#34;&#34;Exception types.&#34;&#34;&#34;


class IntegratorError(RuntimeError):
class Error(RuntimeError):
&#34;&#34;&#34;Base class for errors.&#34;&#34;&#34;


class IntegratorError(Error):
&#34;&#34;&#34;Error raised when integrator step fails.&#34;&#34;&#34;


Expand All @@ -69,7 +82,15 @@ <h1 class="title">Package <code>mici.errors</code></h1>


class ConvergenceError(IntegratorError):
&#34;&#34;&#34;Error raised when solver fails to converge within allowed iterations.&#34;&#34;&#34;</code></pre>
&#34;&#34;&#34;Error raised when solver fails to converge within allowed iterations.&#34;&#34;&#34;


class LinAlgError(Error):
&#34;&#34;&#34;Error raised when a matrix operation raises a linear algebra error.&#34;&#34;&#34;


class HamiltonianDivergenceError(Error):
&#34;&#34;&#34;Error raised when integration of Hamiltonian dynamics diverges.&#34;&#34;&#34;</code></pre>
</details>
</section>
<section>
Expand All @@ -81,6 +102,33 @@ <h1 class="title">Package <code>mici.errors</code></h1>
<section>
<h2 class="section-title" id="header-classes">Classes</h2>
<dl>
<dt id="mici.errors.Error"><code class="flex name class">
<span>class <span class="ident">Error</span></span>
<span>(</span><span>*args, **kwargs)</span>
</code></dt>
<dd>
<section class="desc"><p>Base class for errors.</p></section>
<details class="source">
<summary>
<span>Expand source code</span>
<a href="https://github.com/matt-graham/mici/blob/be3c4cd91f60faf5182ee5704e8e9e61e5dc5b23/mici/errors.py#L4-L5" class="git-link">Browse git</a>
</summary>
<pre><code class="python">class Error(RuntimeError):
&#34;&#34;&#34;Base class for errors.&#34;&#34;&#34;</code></pre>
</details>
<h3>Ancestors</h3>
<ul class="hlist">
<li>builtins.RuntimeError</li>
<li>builtins.Exception</li>
<li>builtins.BaseException</li>
</ul>
<h3>Subclasses</h3>
<ul class="hlist">
<li><a title="mici.errors.IntegratorError" href="#mici.errors.IntegratorError">IntegratorError</a></li>
<li><a title="mici.errors.LinAlgError" href="#mici.errors.LinAlgError">LinAlgError</a></li>
<li><a title="mici.errors.HamiltonianDivergenceError" href="#mici.errors.HamiltonianDivergenceError">HamiltonianDivergenceError</a></li>
</ul>
</dd>
<dt id="mici.errors.IntegratorError"><code class="flex name class">
<span>class <span class="ident">IntegratorError</span></span>
<span>(</span><span>*args, **kwargs)</span>
Expand All @@ -90,13 +138,14 @@ <h2 class="section-title" id="header-classes">Classes</h2>
<details class="source">
<summary>
<span>Expand source code</span>
<a href="https://github.com/matt-graham/mici/blob/02ffeebea97e67a5f32844d7f81a3262956f7580/mici/errors.py#L4-L5" class="git-link">Browse git</a>
<a href="https://github.com/matt-graham/mici/blob/be3c4cd91f60faf5182ee5704e8e9e61e5dc5b23/mici/errors.py#L8-L9" class="git-link">Browse git</a>
</summary>
<pre><code class="python">class IntegratorError(RuntimeError):
<pre><code class="python">class IntegratorError(Error):
&#34;&#34;&#34;Error raised when integrator step fails.&#34;&#34;&#34;</code></pre>
</details>
<h3>Ancestors</h3>
<ul class="hlist">
<li><a title="mici.errors.Error" href="#mici.errors.Error">Error</a></li>
<li>builtins.RuntimeError</li>
<li>builtins.Exception</li>
<li>builtins.BaseException</li>
Expand All @@ -116,14 +165,15 @@ <h3>Subclasses</h3>
<details class="source">
<summary>
<span>Expand source code</span>
<a href="https://github.com/matt-graham/mici/blob/02ffeebea97e67a5f32844d7f81a3262956f7580/mici/errors.py#L8-L9" class="git-link">Browse git</a>
<a href="https://github.com/matt-graham/mici/blob/be3c4cd91f60faf5182ee5704e8e9e61e5dc5b23/mici/errors.py#L12-L13" class="git-link">Browse git</a>
</summary>
<pre><code class="python">class NonReversibleStepError(IntegratorError):
&#34;&#34;&#34;Error raised when integrator step fails reversibility check.&#34;&#34;&#34;</code></pre>
</details>
<h3>Ancestors</h3>
<ul class="hlist">
<li><a title="mici.errors.IntegratorError" href="#mici.errors.IntegratorError">IntegratorError</a></li>
<li><a title="mici.errors.Error" href="#mici.errors.Error">Error</a></li>
<li>builtins.RuntimeError</li>
<li>builtins.Exception</li>
<li>builtins.BaseException</li>
Expand All @@ -138,14 +188,59 @@ <h3>Ancestors</h3>
<details class="source">
<summary>
<span>Expand source code</span>
<a href="https://github.com/matt-graham/mici/blob/02ffeebea97e67a5f32844d7f81a3262956f7580/mici/errors.py#L12-L13" class="git-link">Browse git</a>
<a href="https://github.com/matt-graham/mici/blob/be3c4cd91f60faf5182ee5704e8e9e61e5dc5b23/mici/errors.py#L16-L17" class="git-link">Browse git</a>
</summary>
<pre><code class="python">class ConvergenceError(IntegratorError):
&#34;&#34;&#34;Error raised when solver fails to converge within allowed iterations.&#34;&#34;&#34;</code></pre>
</details>
<h3>Ancestors</h3>
<ul class="hlist">
<li><a title="mici.errors.IntegratorError" href="#mici.errors.IntegratorError">IntegratorError</a></li>
<li><a title="mici.errors.Error" href="#mici.errors.Error">Error</a></li>
<li>builtins.RuntimeError</li>
<li>builtins.Exception</li>
<li>builtins.BaseException</li>
</ul>
</dd>
<dt id="mici.errors.LinAlgError"><code class="flex name class">
<span>class <span class="ident">LinAlgError</span></span>
<span>(</span><span>*args, **kwargs)</span>
</code></dt>
<dd>
<section class="desc"><p>Error raised when a matrix operation raises a linear algebra error.</p></section>
<details class="source">
<summary>
<span>Expand source code</span>
<a href="https://github.com/matt-graham/mici/blob/be3c4cd91f60faf5182ee5704e8e9e61e5dc5b23/mici/errors.py#L20-L21" class="git-link">Browse git</a>
</summary>
<pre><code class="python">class LinAlgError(Error):
&#34;&#34;&#34;Error raised when a matrix operation raises a linear algebra error.&#34;&#34;&#34;</code></pre>
</details>
<h3>Ancestors</h3>
<ul class="hlist">
<li><a title="mici.errors.Error" href="#mici.errors.Error">Error</a></li>
<li>builtins.RuntimeError</li>
<li>builtins.Exception</li>
<li>builtins.BaseException</li>
</ul>
</dd>
<dt id="mici.errors.HamiltonianDivergenceError"><code class="flex name class">
<span>class <span class="ident">HamiltonianDivergenceError</span></span>
<span>(</span><span>*args, **kwargs)</span>
</code></dt>
<dd>
<section class="desc"><p>Error raised when integration of Hamiltonian dynamics diverges.</p></section>
<details class="source">
<summary>
<span>Expand source code</span>
<a href="https://github.com/matt-graham/mici/blob/be3c4cd91f60faf5182ee5704e8e9e61e5dc5b23/mici/errors.py#L24-L25" class="git-link">Browse git</a>
</summary>
<pre><code class="python">class HamiltonianDivergenceError(Error):
&#34;&#34;&#34;Error raised when integration of Hamiltonian dynamics diverges.&#34;&#34;&#34;</code></pre>
</details>
<h3>Ancestors</h3>
<ul class="hlist">
<li><a title="mici.errors.Error" href="#mici.errors.Error">Error</a></li>
<li>builtins.RuntimeError</li>
<li>builtins.Exception</li>
<li>builtins.BaseException</li>
Expand All @@ -157,7 +252,7 @@ <h3>Ancestors</h3>
</main>
<footer id="footer">
Copyright © 2019 Matt Graham
<p>Generated by <a href="https://pdoc3.github.io/pdoc"><cite>pdoc</cite> 0.7.1</a>.</p>
<p>Generated by <a href="https://pdoc3.github.io/pdoc"><cite>pdoc</cite> 0.7.2.dev0+g1b644f6.d20200507</a>.</p>
</footer>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad(); hljs.configure({languages: ["python"]});</script>
Expand Down
6 changes: 3 additions & 3 deletions docs/docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.7.1" />
<meta name="generator" content="pdoc 0.7.2.dev0+g1b644f6.d20200507" />
<title>mici API documentation</title>
<meta name="description" content="MCMC samplers based on simulating Hamiltonian dynamics on a manifold." />
<link href='https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.0/normalize.min.css' rel='stylesheet'>
Expand Down Expand Up @@ -53,7 +53,7 @@ <h1 class="title">Package <code>mici</code></h1>
<details class="source">
<summary>
<span>Expand source code</span>
<a href="https://github.com/matt-graham/mici/blob/02ffeebea97e67a5f32844d7f81a3262956f7580/mici/__init__.py#L0-L14" class="git-link">Browse git</a>
<a href="https://github.com/matt-graham/mici/blob/be3c4cd91f60faf5182ee5704e8e9e61e5dc5b23/mici/__init__.py#L0-L14" class="git-link">Browse git</a>
</summary>
<pre><code class="python"># -*- coding: utf-8 -*-
&#34;&#34;&#34; MCMC samplers based on simulating Hamiltonian dynamics on a manifold. &#34;&#34;&#34;
Expand Down Expand Up @@ -135,7 +135,7 @@ <h2 class="section-title" id="header-submodules">Modules</h2>
</main>
<footer id="footer">
Copyright © 2019 Matt Graham
<p>Generated by <a href="https://pdoc3.github.io/pdoc"><cite>pdoc</cite> 0.7.1</a>.</p>
<p>Generated by <a href="https://pdoc3.github.io/pdoc"><cite>pdoc</cite> 0.7.2.dev0+g1b644f6.d20200507</a>.</p>
</footer>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad(); hljs.configure({languages: ["python"]});</script>
Expand Down
Loading

0 comments on commit 8021f55

Please sign in to comment.