Skip to content

Commit c17c7db

Browse files
author
Documenter.jl
committed
build based on d2e6208
1 parent 993b342 commit c17c7db

File tree

9 files changed

+111
-113
lines changed

9 files changed

+111
-113
lines changed

dev/.documenter-siteinfo.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"documenter":{"julia_version":"1.10.5","generation_timestamp":"2024-10-07T04:12:24","documenter_version":"1.7.0"}}
1+
{"documenter":{"julia_version":"1.11.0","generation_timestamp":"2024-10-08T16:46:18","documenter_version":"1.7.0"}}

dev/abstractmcmc_demo.svg

Lines changed: 30 additions & 32 deletions
Loading

dev/general/index.html

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -43,25 +43,25 @@
4343
Iterations = 1:1:10000
4444
Number of chains = 1
4545
Samples per chain = 10000
46-
Wall duration = 4.2 seconds
47-
Compute duration = 4.2 seconds
46+
Wall duration = 5.15 seconds
47+
Compute duration = 5.15 seconds
4848
parameters = s, m
4949
internals = lp
5050

5151
Summary Statistics
5252
<span class="sgr1"> parameters </span> <span class="sgr1"> mean </span> <span class="sgr1"> std </span> <span class="sgr1"> mcse </span> <span class="sgr1"> ess_bulk </span> <span class="sgr1"> ess_tail </span> <span class="sgr1"> rhat </span>
5353
<span class="sgr90"> Symbol </span> <span class="sgr90"> Float64 </span> <span class="sgr90"> Float64 </span> <span class="sgr90"> Float64 </span> <span class="sgr90"> Float64 </span> <span class="sgr90"> Float64 </span> <span class="sgr90"> Float64 </span>
5454

55-
s 1.6523 5.5991 0.1379 5661.3376 4961.3678 1.0001
56-
m -0.0275 1.3385 0.0173 8825.3567 5115.8379 1.0006
55+
s 1.5620 2.9781 0.0475 5449.3692 5223.0625 1.0009
56+
m 0.0053 1.2591 0.0132 8981.8087 5577.5196 1.0000
5757
<span class="sgr36"> 1 column omitted</span>
5858

5959
Quantiles
6060
<span class="sgr1"> parameters </span> <span class="sgr1"> 2.5% </span> <span class="sgr1"> 25.0% </span> <span class="sgr1"> 50.0% </span> <span class="sgr1"> 75.0% </span> <span class="sgr1"> 97.5% </span>
6161
<span class="sgr90"> Symbol </span> <span class="sgr90"> Float64 </span> <span class="sgr90"> Float64 </span> <span class="sgr90"> Float64 </span> <span class="sgr90"> Float64 </span> <span class="sgr90"> Float64 </span>
6262

63-
s 0.4080 0.7581 1.1333 1.7631 4.8164
64-
m -2.5808 -0.7371 0.0032 0.7029 2.4608
63+
s 0.4197 0.7711 1.1312 1.7585 4.9171
64+
m -2.4716 -0.7378 -0.0064 0.7306 2.5166
6565
</code></pre><h3 id="Conditional-sampling-in-a-Turing.Experimental.Gibbs-sampler"><a class="docs-heading-anchor" href="#Conditional-sampling-in-a-Turing.Experimental.Gibbs-sampler">Conditional sampling in a <code>Turing.Experimental.Gibbs</code> sampler</a><a id="Conditional-sampling-in-a-Turing.Experimental.Gibbs-sampler-1"></a><a class="docs-heading-anchor-permalink" href="#Conditional-sampling-in-a-Turing.Experimental.Gibbs-sampler" title="Permalink"></a></h3><p><code>SliceSampling.jl</code> be used as a conditional sampler in <code>Turing.Experimental.Gibbs</code>.</p><pre><code class="language-julia hljs">using Distributions
6666
using Turing
6767
using SliceSampling
@@ -92,23 +92,23 @@
9292
Iterations = 1:1:1000
9393
Number of chains = 1
9494
Samples per chain = 1000
95-
Wall duration = 19.84 seconds
96-
Compute duration = 19.84 seconds
95+
Wall duration = 23.71 seconds
96+
Compute duration = 23.71 seconds
9797
parameters = p, z
9898
internals = lp
9999

100100
Summary Statistics
101101
<span class="sgr1"> parameters </span> <span class="sgr1"> mean </span> <span class="sgr1"> std </span> <span class="sgr1"> mcse </span> <span class="sgr1"> ess_bulk </span> <span class="sgr1"> ess_tail </span> <span class="sgr1"> rhat </span> <span class="sgr1"> e</span>
102102
<span class="sgr90"> Symbol </span> <span class="sgr90"> Float64 </span> <span class="sgr90"> Float64 </span> <span class="sgr90"> Float64 </span> <span class="sgr90"> Float64 </span> <span class="sgr90"> Float64 </span> <span class="sgr90"> Float64 </span> <span class="sgr90"> </span>
103103

104-
p 0.3952 0.2006 0.0076 718.9934 640.0229 1.0012
105-
z 0.1600 0.3668 0.0122 910.5703 NaN 0.9991
104+
p 0.6001 0.1937 0.0062 953.8497 514.3461 0.9997
105+
z 0.2620 0.4399 0.0156 798.3987 NaN 0.9997
106106
<span class="sgr36"> 1 column omitted</span>
107107

108108
Quantiles
109109
<span class="sgr1"> parameters </span> <span class="sgr1"> 2.5% </span> <span class="sgr1"> 25.0% </span> <span class="sgr1"> 50.0% </span> <span class="sgr1"> 75.0% </span> <span class="sgr1"> 97.5% </span>
110110
<span class="sgr90"> Symbol </span> <span class="sgr90"> Float64 </span> <span class="sgr90"> Float64 </span> <span class="sgr90"> Float64 </span> <span class="sgr90"> Float64 </span> <span class="sgr90"> Float64 </span>
111111

112-
p 0.0628 0.2390 0.3793 0.5390 0.7895
113-
z 0.0000 0.0000 0.0000 0.0000 1.0000
114-
</code></pre><h2 id="Drawing-Samples"><a class="docs-heading-anchor" href="#Drawing-Samples">Drawing Samples</a><a id="Drawing-Samples-1"></a><a class="docs-heading-anchor-permalink" href="#Drawing-Samples" title="Permalink"></a></h2><p>For drawing samples using the algorithms provided by <code>SliceSampling</code>, the user only needs to call:</p><pre><code class="language-julia hljs">sample([rng,] model, slice, N; initial_params)</code></pre><ul><li><code>slice::AbstractSliceSampling</code>: Any slice sampling algorithm provided by <code>SliceSampling</code>.</li><li><code>model</code>: A model implementing the <code>LogDensityProblems</code> interface.</li><li><code>N</code>: The number of samples</li></ul><p>The output is a <code>SliceSampling.Transition</code> object, which contains the following:</p><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="SliceSampling.Transition" href="#SliceSampling.Transition"><code>SliceSampling.Transition</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 Transition</code></pre><p>Struct containing the results of the transition.</p><p><strong>Fields</strong></p><ul><li><code>params</code>: Samples generated by the transition.</li><li><code>lp::Real</code>: Log-target density of the samples.</li><li><code>info::NamedTuple</code>: Named tuple containing information about the transition. </li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/TuringLang/SliceSampling.jl/blob/e5415c49e31aff78df32de71d226d47b299785b4/src/SliceSampling.jl#L24-L33">source</a></section></article><p>For the keyword arguments, <code>SliceSampling</code> allows:</p><ul><li><code>initial_params</code>: The intial state of the Markov chain (default: <code>nothing</code>).</li></ul><p>If <code>initial_params</code> is <code>nothing</code>, the following function can be implemented to provide an initialization:</p><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="SliceSampling.initial_sample" href="#SliceSampling.initial_sample"><code>SliceSampling.initial_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">initial_sample(rng, model)</code></pre><p>Return the initial sample for the <code>model</code> using the random number generator <code>rng</code>.</p><p><strong>Arguments</strong></p><ul><li><code>rng::Random.AbstractRNG</code>: Random number generator.</li><li><code>model</code>: The target <code>LogDensityProblem</code>.</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/TuringLang/SliceSampling.jl/blob/e5415c49e31aff78df32de71d226d47b299785b4/src/SliceSampling.jl#L45-L53">source</a></section></article><h2 id="Performing-a-Single-Transition"><a class="docs-heading-anchor" href="#Performing-a-Single-Transition">Performing a Single Transition</a><a id="Performing-a-Single-Transition-1"></a><a class="docs-heading-anchor-permalink" href="#Performing-a-Single-Transition" title="Permalink"></a></h2><p>For more fined-grained control, the user can call <code>AbstractMCMC.step</code>. That is, the chain can be initialized by calling:</p><pre><code class="language-julia hljs">transition, state = AbstractMCMC.steps([rng,] model, slice; initial_params)</code></pre><p>and then each MCMC transition on <code>state</code> can be performed by calling:</p><pre><code class="language-julia hljs">transition, state = AbstractMCMC.steps([rng,] model, slice, state)</code></pre><p>For more details, refer to the documentation of <code>AbstractMCMC</code>.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« Home</a><a class="docs-footer-nextpage" href="../univariate_slice/">Univariate Slice Sampling »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.7.0 on <span class="colophon-date" title="Monday 7 October 2024 04:12">Monday 7 October 2024</span>. Using Julia version 1.10.5.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
112+
p 0.2064 0.4573 0.6128 0.7432 0.9364
113+
z 0.0000 0.0000 0.0000 1.0000 1.0000
114+
</code></pre><h2 id="Drawing-Samples"><a class="docs-heading-anchor" href="#Drawing-Samples">Drawing Samples</a><a id="Drawing-Samples-1"></a><a class="docs-heading-anchor-permalink" href="#Drawing-Samples" title="Permalink"></a></h2><p>For drawing samples using the algorithms provided by <code>SliceSampling</code>, the user only needs to call:</p><pre><code class="language-julia hljs">sample([rng,] model, slice, N; initial_params)</code></pre><ul><li><code>slice::AbstractSliceSampling</code>: Any slice sampling algorithm provided by <code>SliceSampling</code>.</li><li><code>model</code>: A model implementing the <code>LogDensityProblems</code> interface.</li><li><code>N</code>: The number of samples</li></ul><p>The output is a <code>SliceSampling.Transition</code> object, which contains the following:</p><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="SliceSampling.Transition" href="#SliceSampling.Transition"><code>SliceSampling.Transition</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 Transition</code></pre><p>Struct containing the results of the transition.</p><p><strong>Fields</strong></p><ul><li><code>params</code>: Samples generated by the transition.</li><li><code>lp::Real</code>: Log-target density of the samples.</li><li><code>info::NamedTuple</code>: Named tuple containing information about the transition. </li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/TuringLang/SliceSampling.jl/blob/d2e6208591d6ca2bac3dd166283936c9fc394d2f/src/SliceSampling.jl#L24-L33">source</a></section></article><p>For the keyword arguments, <code>SliceSampling</code> allows:</p><ul><li><code>initial_params</code>: The intial state of the Markov chain (default: <code>nothing</code>).</li></ul><p>If <code>initial_params</code> is <code>nothing</code>, the following function can be implemented to provide an initialization:</p><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="SliceSampling.initial_sample" href="#SliceSampling.initial_sample"><code>SliceSampling.initial_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">initial_sample(rng, model)</code></pre><p>Return the initial sample for the <code>model</code> using the random number generator <code>rng</code>.</p><p><strong>Arguments</strong></p><ul><li><code>rng::Random.AbstractRNG</code>: Random number generator.</li><li><code>model</code>: The target <code>LogDensityProblem</code>.</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/TuringLang/SliceSampling.jl/blob/d2e6208591d6ca2bac3dd166283936c9fc394d2f/src/SliceSampling.jl#L45-L53">source</a></section></article><h2 id="Performing-a-Single-Transition"><a class="docs-heading-anchor" href="#Performing-a-Single-Transition">Performing a Single Transition</a><a id="Performing-a-Single-Transition-1"></a><a class="docs-heading-anchor-permalink" href="#Performing-a-Single-Transition" title="Permalink"></a></h2><p>For more fined-grained control, the user can call <code>AbstractMCMC.step</code>. That is, the chain can be initialized by calling:</p><pre><code class="language-julia hljs">transition, state = AbstractMCMC.steps([rng,] model, slice; initial_params)</code></pre><p>and then each MCMC transition on <code>state</code> can be performed by calling:</p><pre><code class="language-julia hljs">transition, state = AbstractMCMC.steps([rng,] model, slice, state)</code></pre><p>For more details, refer to the documentation of <code>AbstractMCMC</code>.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« Home</a><a class="docs-footer-nextpage" href="../univariate_slice/">Univariate Slice Sampling »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.7.0 on <span class="colophon-date" title="Tuesday 8 October 2024 16:46">Tuesday 8 October 2024</span>. Using Julia version 1.11.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>

0 commit comments

Comments
 (0)