Skip to content

Commit

Permalink
Added navbar and removed insert_navbar.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Oct 4, 2024
1 parent 415066d commit 40851e9
Show file tree
Hide file tree
Showing 5 changed files with 923 additions and 2 deletions.
1 change: 1 addition & 0 deletions dev/api/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@
});
</script>
<!-- NAVBAR END -->

<div id="documenter"><nav class="docs-sidebar"><div class="docs-package-name"><span class="docs-autofit"><a href="../">AdvancedHMC</a></span></div><button class="docs-search-query input is-rounded is-small is-clickable my-2 mx-auto py-1 px-2" id="documenter-search-query">Search docs (Ctrl + /)</button><ul class="docs-menu"><li><a class="tocitem" href="../">AdvancedHMC.jl</a></li><li class="is-active"><a class="tocitem" href>AdvancedHMC.jl</a><ul class="internal"><li><a class="tocitem" href="#Types"><span>Types</span></a></li><li><a class="tocitem" href="#Functions"><span>Functions</span></a></li><li><a class="tocitem" href="#More-types"><span>More types</span></a></li></ul></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><a class="docs-sidebar-button docs-navbar-link fa-solid fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>AdvancedHMC.jl</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>AdvancedHMC.jl</a></li></ul></nav><div class="docs-right"><a class="docs-navbar-link" href="https://github.com/TuringLang/AdvancedHMC.jl" title="View the repository on GitHub"><span class="docs-icon fa-brands"></span><span class="docs-label is-hidden-touch">GitHub</span></a><a class="docs-navbar-link" href="https://github.com/TuringLang/AdvancedHMC.jl/blob/master/docs/src/api.md" title="Edit source on GitHub"><span class="docs-icon fa-solid"></span></a><a class="docs-settings-button docs-navbar-link fa-solid fa-gear" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-article-toggle-button fa-solid fa-chevron-up" id="documenter-article-toggle-button" href="javascript:;" title="Collapse all docstrings"></a></div></header><article class="content" id="documenter-page"><h1 id="AdvancedHMC.jl"><a class="docs-heading-anchor" href="#AdvancedHMC.jl">AdvancedHMC.jl</a><a id="AdvancedHMC.jl-1"></a><a class="docs-heading-anchor-permalink" href="#AdvancedHMC.jl" title="Permalink"></a></h1><p>Documentation for AdvancedHMC.jl</p><ul><li><a href="#AdvancedHMC.jl">AdvancedHMC.jl</a></li><li class="no-marker"><ul><li><a href="#Types">Types</a></li><li><a href="#Functions">Functions</a></li><li><a href="#More-types">More types</a></li></ul></li><li><a href="../#AdvancedHMC.jl">AdvancedHMC.jl</a></li><li class="no-marker"><ul><li><a href="../#A-minimal-example-sampling-from-a-multivariate-Gaussian-using-NUTS">A minimal example - sampling from a multivariate Gaussian using NUTS</a></li><li><a href="../#API-and-supported-HMC-algorithms">API and supported HMC algorithms</a></li><li><a href="../#The-sample-function-signature-in-detail">The <code>sample</code> function signature in detail</a></li><li><a href="../#Citing-AdvancedHMC.jl">Citing AdvancedHMC.jl</a></li><li><a href="../#References">References</a></li><li><a href="../#Footnotes">Footnotes</a></li></ul></li></ul><h2 id="Types"><a class="docs-heading-anchor" href="#Types">Types</a><a id="Types-1"></a><a class="docs-heading-anchor-permalink" href="#Types" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="AdvancedHMC.ClassicNoUTurn" href="#AdvancedHMC.ClassicNoUTurn"><code>AdvancedHMC.ClassicNoUTurn</code></a><span class="docstring-category">Type</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">struct ClassicNoUTurn{F&lt;:AbstractFloat} &lt;: AdvancedHMC.DynamicTerminationCriterion</code></pre><p>Classic No-U-Turn criterion as described in Eq. (9) in [1].</p><p>Informally, this will terminate the trajectory expansion if continuing the simulation either forwards or backwards in time will decrease the distance between the left-most and right-most positions.</p><p><strong>Fields</strong></p><ul><li><p><code>max_depth::Int64</code></p></li><li><p><code>Δ_max::AbstractFloat</code></p></li></ul><p><strong>References</strong></p><ol><li>Hoffman, M. D., &amp; Gelman, A. (2014). The No-U-Turn Sampler: adaptively setting path lengths in Hamiltonian Monte Carlo. Journal of Machine Learning Research, 15(1), 1593-1623. (<a href="http://arxiv.org/abs/1111.4246">arXiv</a>)</li></ol></div><a class="docs-sourcelink" target="_blank" href="https://github.com/TuringLang/AdvancedHMC.jl/blob/85bf5fe6d2347b8bc7079bbcf6edaff92d7b20d0/src/trajectory.jl#L388">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="AdvancedHMC.HMCSampler" href="#AdvancedHMC.HMCSampler"><code>AdvancedHMC.HMCSampler</code></a><span class="docstring-category">Type</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">HMCSampler</code></pre><p>An <code>AbstractMCMC.AbstractSampler</code> for kernels in AdvancedHMC.jl.</p><p><strong>Fields</strong></p><ul><li><p><code>κ</code>: <a href="#AdvancedHMC.AbstractMCMCKernel-api"><code>AbstractMCMCKernel</code></a>.</p></li><li><p><code>metric</code>: Choice of initial metric <a href="#AdvancedHMC.AbstractMetric-api"><code>AbstractMetric</code></a>. The metric type will be preserved during adaption.</p></li><li><p><code>adaptor</code>: <a href="#AdvancedHMC.Adaptation.AbstractAdaptor-api"><code>AdvancedHMC.Adaptation.AbstractAdaptor</code></a>.</p></li></ul><p><strong>Notes</strong></p><p>Note that all the fields have the prefix <code>initial_</code> to indicate that these will not necessarily correspond to the <code>kernel</code>, <code>metric</code>, and <code>adaptor</code> after sampling.</p><p>To access the updated fields, use the resulting <a href="#AdvancedHMC.HMCState-api"><code>HMCState</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/TuringLang/AdvancedHMC.jl/blob/85bf5fe6d2347b8bc7079bbcf6edaff92d7b20d0/src/constructors.jl#L37-L53">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="AdvancedHMC.HMC" href="#AdvancedHMC.HMC"><code>AdvancedHMC.HMC</code></a><span class="docstring-category">Type</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">HMC(ϵ::Real, n_leapfrog::Int)</code></pre><p>Hamiltonian Monte Carlo sampler with static trajectory.</p><p><strong>Fields</strong></p><ul><li><p><code>n_leapfrog</code>: Number of leapfrog steps.</p></li><li><p><code>integrator</code>: Choice of integrator, specified either using a <code>Symbol</code> or <a href="#AdvancedHMC.AbstractIntegrator-api"><code>AbstractIntegrator</code></a></p></li><li><p><code>metric</code>: Choice of initial metric; <code>Symbol</code> means it is automatically initialised. The metric type will be preserved during automatic initialisation and adaption.</p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/TuringLang/AdvancedHMC.jl/blob/85bf5fe6d2347b8bc7079bbcf6edaff92d7b20d0/src/constructors.jl#L102-L110">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="AdvancedHMC.NUTS" href="#AdvancedHMC.NUTS"><code>AdvancedHMC.NUTS</code></a><span class="docstring-category">Type</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">NUTS(δ::Real; max_depth::Int=10, Δ_max::Real=1000, integrator = :leapfrog, metric = :diagonal)</code></pre><p>No-U-Turn Sampler (NUTS) sampler.</p><p><strong>Fields</strong></p><ul><li><p><code>δ</code>: Target acceptance rate for dual averaging.</p></li><li><p><code>max_depth</code>: Maximum doubling tree depth.</p></li><li><p><code>Δ_max</code>: Maximum divergence during doubling tree.</p></li><li><p><code>integrator</code>: Choice of integrator, specified either using a <code>Symbol</code> or <a href="#AdvancedHMC.AbstractIntegrator-api"><code>AbstractIntegrator</code></a></p></li><li><p><code>metric</code>: Choice of initial metric; <code>Symbol</code> means it is automatically initialised. The metric type will be preserved during automatic initialisation and adaption.</p></li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/TuringLang/AdvancedHMC.jl/blob/85bf5fe6d2347b8bc7079bbcf6edaff92d7b20d0/src/constructors.jl#L69-L77">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="AdvancedHMC.HMCDA" href="#AdvancedHMC.HMCDA"><code>AdvancedHMC.HMCDA</code></a><span class="docstring-category">Type</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">HMCDA(δ::Real, λ::Real, integrator = :leapfrog, metric = :diagonal)</code></pre><p>Hamiltonian Monte Carlo sampler with Dual Averaging algorithm.</p><p><strong>Fields</strong></p><ul><li><p><code>δ</code>: Target acceptance rate for dual averaging.</p></li><li><p><code>λ</code>: Target leapfrog length.</p></li><li><p><code>integrator</code>: Choice of integrator, specified either using a <code>Symbol</code> or <a href="#AdvancedHMC.AbstractIntegrator-api"><code>AbstractIntegrator</code></a></p></li><li><p><code>metric</code>: Choice of initial metric; <code>Symbol</code> means it is automatically initialised. The metric type will be preserved during automatic initialisation and adaption.</p></li></ul><p><strong>Notes</strong></p><p>For more information, please view the following paper (<a href="https://arxiv.org/abs/1111.4246">arXiv link</a>):</p><ul><li>Hoffman, Matthew D., and Andrew Gelman. &quot;The No-U-turn sampler: adaptively setting path lengths in Hamiltonian Monte Carlo.&quot; Journal of Machine Learning Research 15, no. 1 (2014): 1593-1623.</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/TuringLang/AdvancedHMC.jl/blob/85bf5fe6d2347b8bc7079bbcf6edaff92d7b20d0/src/constructors.jl#L130-L146">source</a></section></article><h2 id="Functions"><a class="docs-heading-anchor" href="#Functions">Functions</a><a id="Functions-1"></a><a class="docs-heading-anchor-permalink" href="#Functions" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="StatsBase.sample" href="#StatsBase.sample"><code>StatsBase.sample</code></a><span class="docstring-category">Function</span><span class="is-flex-grow-1 docstring-article-toggle-button" title="Collapse docstring"></span></header><section><div><pre><code class="language-julia hljs">sample([rng], a, [wv::AbstractWeights])</code></pre><p>Select a single random element of <code>a</code>. Sampling probabilities are proportional to the weights given in <code>wv</code>, if provided.</p><p>Optionally specify a random number generator <code>rng</code> as the first argument (defaults to <code>Random.default_rng()</code>).</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/JuliaStats/StatsBase.jl/blob/v0.34.3/src/sampling.jl#L462-L470">source</a></section><section><div><pre><code class="language-julia hljs">sample([rng], a, [wv::AbstractWeights], n::Integer; replace=true, ordered=false)</code></pre><p>Select a random, optionally weighted sample of size <code>n</code> from an array <code>a</code> using a polyalgorithm. Sampling probabilities are proportional to the weights given in <code>wv</code>, if provided. <code>replace</code> dictates whether sampling is performed with replacement. <code>ordered</code> dictates whether an ordered sample (also called a sequential sample, i.e. a sample where items appear in the same order as in <code>a</code>) should be taken.</p><p>Optionally specify a random number generator <code>rng</code> as the first argument (defaults to <code>Random.default_rng()</code>).</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/JuliaStats/StatsBase.jl/blob/v0.34.3/src/sampling.jl#L534-L546">source</a></section><section><div><pre><code class="language-julia hljs">sample([rng], a, [wv::AbstractWeights], dims::Dims; replace=true, ordered=false)</code></pre><p>Select a random, optionally weighted sample from an array <code>a</code> specifying the dimensions <code>dims</code> of the output array. Sampling probabilities are proportional to the weights given in <code>wv</code>, if provided. <code>replace</code> dictates whether sampling is performed with replacement. <code>ordered</code> dictates whether an ordered sample (also called a sequential sample, i.e. a sample where items appear in the same order as in <code>a</code>) should be taken.</p><p>Optionally specify a random number generator <code>rng</code> as the first argument (defaults to <code>Random.default_rng()</code>).</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/JuliaStats/StatsBase.jl/blob/v0.34.3/src/sampling.jl#L555-L567">source</a></section><section><div><pre><code class="language-julia hljs">sample([rng], wv::AbstractWeights)</code></pre><p>Select a single random integer in <code>1:length(wv)</code> with probabilities proportional to the weights given in <code>wv</code>.</p><p>Optionally specify a random number generator <code>rng</code> as the first argument (defaults to <code>Random.default_rng()</code>).</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/JuliaStats/StatsBase.jl/blob/v0.34.3/src/sampling.jl#L581-L589">source</a></section><section><div><pre><code class="language-julia hljs">sample(
rng::Random.AbatractRNG=Random.default_rng(),
model::AbstractModel,
Expand Down
Loading

0 comments on commit 40851e9

Please sign in to comment.