Skip to content

Commit

Permalink
build based on f4fd6cf
Browse files Browse the repository at this point in the history
  • Loading branch information
Documenter.jl committed Mar 19, 2024
1 parent e750d40 commit 8b96149
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion dev/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@
</p>
<p>
<a id="8">[8]</a> V. Elvira, J. Míguez and P. M. Djurić, "Adapting the Number of Particles in Sequential Monte Carlo Methods Through an Online Scheme for Convergence Assessment," in IEEE Transactions on Signal Processing, vol. 65, no. 7, pp. 1781-1794, 1 April 2017, doi: 10.1109/TSP.2016.2637324.
</p></article><nav class="docs-footer"><a class="docs-footer-nextpage" href="initialize/">Particle Initialization »</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="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.28.0-DEV on <span class="colophon-date" title="Monday 18 March 2024 23:43">Monday 18 March 2024</span>. Using Julia version 1.6.7.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
</p></article><nav class="docs-footer"><a class="docs-footer-nextpage" href="initialize/">Particle Initialization »</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="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.28.0-DEV on <span class="colophon-date" title="Tuesday 19 March 2024 01:24">Tuesday 19 March 2024</span>. Using Julia version 1.6.7.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
4 changes: 2 additions & 2 deletions dev/initialize/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
pf_initialize(model::GenerativeFunction, model_args::Tuple,
observations::ChoiceMap, proposal::GenerativeFunction,
proposal_args::Tuple, n_particles::Int;
dynamic=false)</code></pre><p>Initialize a particle filter, generating traces (i.e. particles) from the <code>model</code> constrained to the provided <code>observations</code>. A custom <code>proposal</code> can optionally be used to propose choices for the initial set of traces. Returns a <a href="../utils/#Gen.ParticleFilterState"><code>ParticleFilterState</code></a>.</p><p>If <code>dynamic</code> is <code>true</code>, the particle filter will not be specialized to a fixed trace type, allowing for sequential Monte Carlo inference over a sequence of models with differing structure, at the expense of more memory usage.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/probcomp/GenParticleFilters.jl/blob/43c95fca21d8ffe875e42a243d5887f87768e06b/src/initialize.jl#L12-L30">source</a></section></article><h2 id="Stratified-initialization"><a class="docs-heading-anchor" href="#Stratified-initialization">Stratified initialization</a><a id="Stratified-initialization-1"></a><a class="docs-heading-anchor-permalink" href="#Stratified-initialization" title="Permalink"></a></h2><p>To reduce variance, particle filters can also be initialized via stratified sampling, given a list of provided <code>strata</code>.</p><article class="docstring"><header><a class="docstring-binding" id="GenParticleFilters.pf_initialize-Tuple{Gen.GenerativeFunction, Tuple, Gen.ChoiceMap, Any, Int64}" href="#GenParticleFilters.pf_initialize-Tuple{Gen.GenerativeFunction, Tuple, Gen.ChoiceMap, Any, Int64}"><code>GenParticleFilters.pf_initialize</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">pf_initialize(model::GenerativeFunction, model_args::Tuple,
dynamic=false)</code></pre><p>Initialize a particle filter, generating traces (i.e. particles) from the <code>model</code> constrained to the provided <code>observations</code>. A custom <code>proposal</code> can optionally be used to propose choices for the initial set of traces. Returns a <a href="../utils/#Gen.ParticleFilterState"><code>ParticleFilterState</code></a>.</p><p>If <code>dynamic</code> is <code>true</code>, the particle filter will not be specialized to a fixed trace type, allowing for sequential Monte Carlo inference over a sequence of models with differing structure, at the expense of more memory usage.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/probcomp/GenParticleFilters.jl/blob/f4fd6cf6cc4361a9aa56dd580a374f8f067658a2/src/initialize.jl#L12-L30">source</a></section></article><h2 id="Stratified-initialization"><a class="docs-heading-anchor" href="#Stratified-initialization">Stratified initialization</a><a id="Stratified-initialization-1"></a><a class="docs-heading-anchor-permalink" href="#Stratified-initialization" title="Permalink"></a></h2><p>To reduce variance, particle filters can also be initialized via stratified sampling, given a list of provided <code>strata</code>.</p><article class="docstring"><header><a class="docstring-binding" id="GenParticleFilters.pf_initialize-Tuple{Gen.GenerativeFunction, Tuple, Gen.ChoiceMap, Any, Int64}" href="#GenParticleFilters.pf_initialize-Tuple{Gen.GenerativeFunction, Tuple, Gen.ChoiceMap, Any, Int64}"><code>GenParticleFilters.pf_initialize</code></a><span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">pf_initialize(model::GenerativeFunction, model_args::Tuple,
observations::ChoiceMap, strata, n_particles::Int;
layout=:contiguous, dynamic=false)

pf_initialize(model::GenerativeFunction, model_args::Tuple,
observations::ChoiceMap, strata,
proposal::GenerativeFunction, proposal_args::Tuple,
n_particles::Int; layout=:contiguous, dynamic=false)</code></pre><p>Perform <em>stratified</em> initialization of a particle filter, given a set of <code>strata</code> specified as an iterator over choicemaps. Each generated trace is constrained to both the provided <code>observations</code> and the choicemap for the stratum it belongs to. A custom <code>proposal</code> can optionally be used to propose unconstrained choices.</p><p>For a filter with <code>N</code> particles and <code>K</code> strata, each stratum is first allocated <code>B = ⌊N / K⌋</code> particles. If <code>layout</code> is <code>:contiguous</code>, these particles will be allocated in contiguous blocks (e.g., the particles for the first stratum will have indices <code>1:B</code>). If <code>layout</code> is <code>:interleaved</code>, then particles from each stratum will have interleaved indices (e.g., the first stratum will have indices <code>1:K:B*K</code>). The remaining <code>R</code> particles are distributed at random among the strata, and allocated the indices <code>N-R:N</code>.</p><p>If <code>dynamic</code> is <code>true</code>, the particle filter will not be specialized to a fixed trace type, allowing for sequential Monte Carlo inference over a sequence of models with differing structure, at the expense of more memory usage.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/probcomp/GenParticleFilters.jl/blob/43c95fca21d8ffe875e42a243d5887f87768e06b/src/initialize.jl#L64-L91">source</a></section></article><p>For convenience, strata can be generated using the <a href="../utils/#GenParticleFilters.choiceproduct"><code>choiceproduct</code></a> function.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« Home</a><a class="docs-footer-nextpage" href="../update/">Particle Updating »</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="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.28.0-DEV on <span class="colophon-date" title="Monday 18 March 2024 23:43">Monday 18 March 2024</span>. Using Julia version 1.6.7.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
n_particles::Int; layout=:contiguous, dynamic=false)</code></pre><p>Perform <em>stratified</em> initialization of a particle filter, given a set of <code>strata</code> specified as an iterator over choicemaps. Each generated trace is constrained to both the provided <code>observations</code> and the choicemap for the stratum it belongs to. A custom <code>proposal</code> can optionally be used to propose unconstrained choices.</p><p>For a filter with <code>N</code> particles and <code>K</code> strata, each stratum is first allocated <code>B = ⌊N / K⌋</code> particles. If <code>layout</code> is <code>:contiguous</code>, these particles will be allocated in contiguous blocks (e.g., the particles for the first stratum will have indices <code>1:B</code>). If <code>layout</code> is <code>:interleaved</code>, then particles from each stratum will have interleaved indices (e.g., the first stratum will have indices <code>1:K:B*K</code>). The remaining <code>R</code> particles are distributed at random among the strata, and allocated the indices <code>N-R:N</code>.</p><p>If <code>dynamic</code> is <code>true</code>, the particle filter will not be specialized to a fixed trace type, allowing for sequential Monte Carlo inference over a sequence of models with differing structure, at the expense of more memory usage.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/probcomp/GenParticleFilters.jl/blob/f4fd6cf6cc4361a9aa56dd580a374f8f067658a2/src/initialize.jl#L64-L91">source</a></section></article><p>For convenience, strata can be generated using the <a href="../utils/#GenParticleFilters.choiceproduct"><code>choiceproduct</code></a> function.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« Home</a><a class="docs-footer-nextpage" href="../update/">Particle Updating »</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="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.28.0-DEV on <span class="colophon-date" title="Tuesday 19 March 2024 01:24">Tuesday 19 March 2024</span>. Using Julia version 1.6.7.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
Loading

0 comments on commit 8b96149

Please sign in to comment.