Skip to content

Commit

Permalink
build based on 59759cf
Browse files Browse the repository at this point in the history
  • Loading branch information
zeptodoctor committed Oct 27, 2023
1 parent 8a83227 commit 3165c75
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion dev/advanced_usage/index.html

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions dev/api/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dev/comparison/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@
plot!(0 .+ ym, yxr, lab="Linear Gaussian propagation")
end
fig
end</code></pre><pre><code class="language-none">plot_dens (generic function with 2 methods)</code></pre><p>The first example we&#39;ll look at is the quadratic parabola. This function will be poorly approximated by a linear function around <span>$x=0$</span>.</p><pre><code class="language-julia">plot_dens(x-&gt;x^2+3, Normal(0,1), -3, 3, legend=:top)</code></pre><object type="text/html" data="../parabola.html" style="width:100%;height:450px;"></object><p>as we can see, the linear method outputs a Dirac distribution (no uncertainty) at <span>$x=0$</span>, while there should clearly be a lot of uncertainty in the output. The histogram displays the output density as approximated by the particles. The histogram does not go below zero, and tapers off as values increase. The problem here is that the uncertainty is large in relation to the curvature of the function. As the uncertainty decreases, the true output density becomes closer and closer to a DIrac distribution.</p><p>The next function has a discontinuity (≈ infinite curvature)</p><pre><code class="language-julia">plot_dens(x-&gt;sign(x)+1, Normal(0.5,1), -3, 3, legend=:bottomright)</code></pre><object type="text/html" data="../sign.html" style="width:100%;height:450px;"></object><p>once again, linear uncertainty propagation outputs a distribution with zero uncertainty. The true output distribution has two modes since the input distribution places mass on both sides of the discontinuity. This is captured in the particle distribution, where most particles end up at the right side of the discontinuity, while a smaller proportion of the particles end up to the left. If the input density would have its mean at 0, half of the particles would end up in each of the output locations. Any function containing an if-statement where the chosen branch depends on an uncertain value falls into this category.</p><p>Next, we consider a periodic function</p><pre><code class="language-julia">plot_dens(x-&gt;sin(x)+2, Normal(0.5,1), -3, 3, legend=:topright)</code></pre><object type="text/html" data="../sin.html" style="width:100%;height:450px;"></object><p>Once again, the uncertainty is large in relation to the curvature of the function and linear uncertainty propagation places significant mass outside the interval <span>$[-1, 1]$</span> which is the range of the <span>$\sin$</span> function. The particle histogram respects this range. If we increase the uncertainty in the input further, the linear approximation to the function becomes increasingly worse</p><pre><code class="language-julia">plot_dens(x-&gt;sin(x)+2, Normal(0.5,5), -15, 15, legend=:topright)</code></pre><object type="text/html" data="../sin_wide.html" style="width:100%;height:450px;"></object><h2 id="Pendulum-simulation-1"><a class="docs-heading-anchor" href="#Pendulum-simulation-1">Pendulum simulation</a><a class="docs-heading-anchor-permalink" href="#Pendulum-simulation-1" title="Permalink"></a></h2><p>The example <a href="../examples/#Differential-Equations-1">Differential Equations</a> shows how linear/Monte-Carlo uncertainty propagation through a nonlinear ODE works.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../examples/">« Examples</a><a class="docs-footer-nextpage" href="../performance/">Performance tips »</a></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> on <span class="colophon-date" title="Sunday 1 October 2023 10:39">Sunday 1 October 2023</span>. Using Julia version 1.6.7.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
end</code></pre><pre><code class="language-none">plot_dens (generic function with 2 methods)</code></pre><p>The first example we&#39;ll look at is the quadratic parabola. This function will be poorly approximated by a linear function around <span>$x=0$</span>.</p><pre><code class="language-julia">plot_dens(x-&gt;x^2+3, Normal(0,1), -3, 3, legend=:top)</code></pre><object type="text/html" data="../parabola.html" style="width:100%;height:450px;"></object><p>as we can see, the linear method outputs a Dirac distribution (no uncertainty) at <span>$x=0$</span>, while there should clearly be a lot of uncertainty in the output. The histogram displays the output density as approximated by the particles. The histogram does not go below zero, and tapers off as values increase. The problem here is that the uncertainty is large in relation to the curvature of the function. As the uncertainty decreases, the true output density becomes closer and closer to a DIrac distribution.</p><p>The next function has a discontinuity (≈ infinite curvature)</p><pre><code class="language-julia">plot_dens(x-&gt;sign(x)+1, Normal(0.5,1), -3, 3, legend=:bottomright)</code></pre><object type="text/html" data="../sign.html" style="width:100%;height:450px;"></object><p>once again, linear uncertainty propagation outputs a distribution with zero uncertainty. The true output distribution has two modes since the input distribution places mass on both sides of the discontinuity. This is captured in the particle distribution, where most particles end up at the right side of the discontinuity, while a smaller proportion of the particles end up to the left. If the input density would have its mean at 0, half of the particles would end up in each of the output locations. Any function containing an if-statement where the chosen branch depends on an uncertain value falls into this category.</p><p>Next, we consider a periodic function</p><pre><code class="language-julia">plot_dens(x-&gt;sin(x)+2, Normal(0.5,1), -3, 3, legend=:topright)</code></pre><object type="text/html" data="../sin.html" style="width:100%;height:450px;"></object><p>Once again, the uncertainty is large in relation to the curvature of the function and linear uncertainty propagation places significant mass outside the interval <span>$[-1, 1]$</span> which is the range of the <span>$\sin$</span> function. The particle histogram respects this range. If we increase the uncertainty in the input further, the linear approximation to the function becomes increasingly worse</p><pre><code class="language-julia">plot_dens(x-&gt;sin(x)+2, Normal(0.5,5), -15, 15, legend=:topright)</code></pre><object type="text/html" data="../sin_wide.html" style="width:100%;height:450px;"></object><h2 id="Pendulum-simulation-1"><a class="docs-heading-anchor" href="#Pendulum-simulation-1">Pendulum simulation</a><a class="docs-heading-anchor-permalink" href="#Pendulum-simulation-1" title="Permalink"></a></h2><p>The example <a href="../examples/#Differential-Equations-1">Differential Equations</a> shows how linear/Monte-Carlo uncertainty propagation through a nonlinear ODE works.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../examples/">« Examples</a><a class="docs-footer-nextpage" href="../performance/">Performance tips »</a></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> on <span class="colophon-date" title="Friday 27 October 2023 04:49">Friday 27 October 2023</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 3165c75

Please sign in to comment.