Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
stratisMarkou committed Dec 17, 2024
1 parent 0135ef7 commit a859448
Show file tree
Hide file tree
Showing 42 changed files with 15,966 additions and 21,817 deletions.
8,004 changes: 8,004 additions & 0 deletions _images/4c4c0f29cc22ddd0c694e31c7f01d15dc89190797a214d20199c3eef11d3e7c8.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10,232 changes: 0 additions & 10,232 deletions _images/5b555565b39c4a5f1f1d65d51458d0ce8dfec8a60ba62cc51cb301d287ecd9e5.svg

This file was deleted.

566 changes: 11 additions & 555 deletions _sources/book/mira/000-exercises.md

Large diffs are not rendered by default.

325 changes: 89 additions & 236 deletions _sources/book/mira/002-measures.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion _sources/book/papers/num-sde/num-sde.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"This paper is an accessible introduction to SDEs, which is centered around ten scripts.\n",
"Below are reproductions of these scripts (excluding two on linear stability) and some supplementary notes.\n",
"\n",
"## Why stochastic differential equations\n",
"## Why Stochastic differential equations\n",
"\n",
"We are often interested in modelling a system whose state takes values in a continuous range, and over a continuous time domain.\n",
"Whereas ordinary differential equations (ODEs) describe variables which change according to a deterministic rule, SDEs describe variables whose change is governed partly by a deterministic component and partly by a stochastic component.\n",
Expand Down
16,872 changes: 7,321 additions & 9,551 deletions _sources/book/papers/swin/swin.ipynb

Large diffs are not rendered by default.

578 changes: 6 additions & 572 deletions book/mira/000-exercises.html

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions book/mira/000-intro.html
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Papers &amp; Miscellanous</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1 has-children"><a class="reference internal" href="../papers/intro.html">Stream of papers</a><input class="toctree-checkbox" id="toctree-checkbox-4" name="toctree-checkbox-4" type="checkbox"/><label class="toctree-toggle" for="toctree-checkbox-4"><i class="fa-solid fa-chevron-down"></i></label><ul>
<li class="toctree-l2"><a class="reference internal" href="../papers/swin/swin.html">Shifted window transformers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../papers/transformers/transformers.html">Introduction to transformers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../papers/why-covariances/why-covariances.html">Why covariance functions?</a></li>
<li class="toctree-l2"><a class="reference internal" href="../papers/ais/ais.html">Annealed importance sampling</a></li>
Expand Down
1 change: 1 addition & 0 deletions book/mira/001-riemann.html
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Papers &amp; Miscellanous</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1 has-children"><a class="reference internal" href="../papers/intro.html">Stream of papers</a><input class="toctree-checkbox" id="toctree-checkbox-4" name="toctree-checkbox-4" type="checkbox"/><label class="toctree-toggle" for="toctree-checkbox-4"><i class="fa-solid fa-chevron-down"></i></label><ul>
<li class="toctree-l2"><a class="reference internal" href="../papers/swin/swin.html">Shifted window transformers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../papers/transformers/transformers.html">Introduction to transformers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../papers/why-covariances/why-covariances.html">Why covariance functions?</a></li>
<li class="toctree-l2"><a class="reference internal" href="../papers/ais/ais.html">Annealed importance sampling</a></li>
Expand Down
345 changes: 54 additions & 291 deletions book/mira/002-measures.html

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions book/papers/ais/ais.html
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Papers &amp; Miscellanous</span></p>
<ul class="current nav bd-sidenav">
<li class="toctree-l1 current active has-children"><a class="reference internal" href="../intro.html">Stream of papers</a><input checked="" class="toctree-checkbox" id="toctree-checkbox-4" name="toctree-checkbox-4" type="checkbox"/><label class="toctree-toggle" for="toctree-checkbox-4"><i class="fa-solid fa-chevron-down"></i></label><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../swin/swin.html">Shifted window transformers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../transformers/transformers.html">Introduction to transformers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../why-covariances/why-covariances.html">Why covariance functions?</a></li>
<li class="toctree-l2 current active"><a class="current reference internal" href="#">Annealed importance sampling</a></li>
Expand Down Expand Up @@ -643,7 +644,7 @@ <h2>Importance-weighted MCMC<a class="headerlink" href="#importance-weighted-mcm
So we could, in principle, use MCMC within an importance-weighted estimator to reduce its variance.
The following algorithm is based on this intuition.</p>
<div class="proof definition admonition" id="definition-1">
<p class="admonition-title"><span class="caption-number">Definition 70 </span> (Importance weighted MCMC algorithm)</p>
<p class="admonition-title"><span class="caption-number">Definition 69 </span> (Importance weighted MCMC algorithm)</p>
<section class="definition-content" id="proof-content">
<p>Given a proposal density <span class="math notranslate nohighlight">\(q\)</span>, a target density <span class="math notranslate nohighlight">\(p\)</span> and a sequence of transition kernels <span class="math notranslate nohighlight">\(T_1(x, x'), \dots, T_K(x, x')\)</span> be a sequence of transition kernels such that <span class="math notranslate nohighlight">\(T_k\)</span> leaves <span class="math notranslate nohighlight">\(p\)</span> invariant.
Sampling <span class="math notranslate nohighlight">\(x_0 \sim q(x)\)</span> followed by</p>
Expand Down Expand Up @@ -731,7 +732,7 @@ <h2>Annealed Importance Sampling<a class="headerlink" href="#id2" title="Link to
<p>These distributions interpolate between <span class="math notranslate nohighlight">\(q\)</span> and <span class="math notranslate nohighlight">\(p\)</span> as we vary <span class="math notranslate nohighlight">\(\beta\)</span>.
AIS then proceeds in a similar way to the importance weighted MCMC algorithm we highlighted above, except that it requires that each <span class="math notranslate nohighlight">\(T_k\)</span> leaves <span class="math notranslate nohighlight">\(\pi_k\)</span>, instead of <span class="math notranslate nohighlight">\(p\)</span>, invariant.</p>
<div class="proof definition admonition" id="definition-2">
<p class="admonition-title"><span class="caption-number">Definition 71 </span> (Annealed Importance Sampling)</p>
<p class="admonition-title"><span class="caption-number">Definition 70 </span> (Annealed Importance Sampling)</p>
<section class="definition-content" id="proof-content">
<p>Given a target density <span class="math notranslate nohighlight">\(p\)</span>, a proposal density <span class="math notranslate nohighlight">\(q\)</span> and a sequence <span class="math notranslate nohighlight">\(0 = \beta_0 \leq \dots \leq \beta_K = 1\)</span>, define</p>
<div class="math notranslate nohighlight">
Expand Down
7 changes: 4 additions & 3 deletions book/papers/intro.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
<link rel="icon" href="../../_static/dicefav.png"/>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="Introduction to transformers" href="transformers/transformers.html" />
<link rel="next" title="Shifted window transformers" href="swin/swin.html" />
<link rel="prev" title="Exercises" href="../mira/000-exercises.html" />
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="docsearch:language" content="en"/>
Expand Down Expand Up @@ -217,6 +217,7 @@
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Papers &amp; Miscellanous</span></p>
<ul class="current nav bd-sidenav">
<li class="toctree-l1 current active has-children"><a class="current reference internal" href="#">Stream of papers</a><input checked="" class="toctree-checkbox" id="toctree-checkbox-4" name="toctree-checkbox-4" type="checkbox"/><label class="toctree-toggle" for="toctree-checkbox-4"><i class="fa-solid fa-chevron-down"></i></label><ul>
<li class="toctree-l2"><a class="reference internal" href="swin/swin.html">Shifted window transformers</a></li>
<li class="toctree-l2"><a class="reference internal" href="transformers/transformers.html">Introduction to transformers</a></li>
<li class="toctree-l2"><a class="reference internal" href="why-covariances/why-covariances.html">Why covariance functions?</a></li>
<li class="toctree-l2"><a class="reference internal" href="ais/ais.html">Annealed importance sampling</a></li>
Expand Down Expand Up @@ -477,11 +478,11 @@ <h1>Stream of papers<a class="headerlink" href="#stream-of-papers" title="Link t
</div>
</a>
<a class="right-next"
href="transformers/transformers.html"
href="swin/swin.html"
title="next page">
<div class="prev-next-info">
<p class="prev-next-subtitle">next</p>
<p class="prev-next-title">Introduction to transformers</p>
<p class="prev-next-title">Shifted window transformers</p>
</div>
<i class="fa-solid fa-angle-right"></i>
</a>
Expand Down
19 changes: 10 additions & 9 deletions book/papers/num-sde/num-sde.html
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Papers &amp; Miscellanous</span></p>
<ul class="current nav bd-sidenav">
<li class="toctree-l1 current active has-children"><a class="reference internal" href="../intro.html">Stream of papers</a><input checked="" class="toctree-checkbox" id="toctree-checkbox-4" name="toctree-checkbox-4" type="checkbox"/><label class="toctree-toggle" for="toctree-checkbox-4"><i class="fa-solid fa-chevron-down"></i></label><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../swin/swin.html">Shifted window transformers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../transformers/transformers.html">Introduction to transformers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../why-covariances/why-covariances.html">Why covariance functions?</a></li>
<li class="toctree-l2"><a class="reference internal" href="../ais/ais.html">Annealed importance sampling</a></li>
Expand Down Expand Up @@ -420,7 +421,7 @@ <h2> Contents </h2>
</div>
<nav aria-label="Page">
<ul class="visible nav section-nav flex-column">
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#why-stochastic-differential-equations">Why stochastic differential equations</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#why-stochastic-differential-equations">Why Stochastic differential equations</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#the-wiener-process">The Wiener process</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#sampling-from-a-wiener-process">Sampling from a Wiener process</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#function-of-a-wiener-process">Function of a Wiener process</a></li>
Expand Down Expand Up @@ -452,7 +453,7 @@ <h1>Numerical simulation of SDEs<a class="headerlink" href="#numerical-simulatio
This paper is an accessible introduction to SDEs, which is centered around ten scripts.
Below are reproductions of these scripts (excluding two on linear stability) and some supplementary notes.</p>
<section id="why-stochastic-differential-equations">
<h2>Why stochastic differential equations<a class="headerlink" href="#why-stochastic-differential-equations" title="Link to this heading">#</a></h2>
<h2>Why Stochastic differential equations<a class="headerlink" href="#why-stochastic-differential-equations" title="Link to this heading">#</a></h2>
<p>We are often interested in modelling a system whose state takes values in a continuous range, and over a continuous time domain.
Whereas ordinary differential equations (ODEs) describe variables which change according to a deterministic rule, SDEs describe variables whose change is governed partly by a deterministic component and partly by a stochastic component.
SDEs are therefore an appropriate model for systems whose dynamics involve some true randomness, or some fine grained complexity which we cannot afford to or do not wish to model.</p>
Expand All @@ -461,7 +462,7 @@ <h2>Why stochastic differential equations<a class="headerlink" href="#why-stocha
<h2>The Wiener process<a class="headerlink" href="#the-wiener-process" title="Link to this heading">#</a></h2>
<p>In order to define the stochastic component of the transition rule of a stochastic system, we must define an appropriate noise model. The Wiener process is a stochastic process that is commonly used for this purpose.</p>
<div class="proof definition admonition" id="definition-0">
<p class="admonition-title"><span class="caption-number">Definition 75 </span> (Wiener process)</p>
<p class="admonition-title"><span class="caption-number">Definition 74 </span> (Wiener process)</p>
<section class="definition-content" id="proof-content">
<p>A standard Wiener process over [0, T] is a random variable <span class="math notranslate nohighlight">\(W(t)\)</span> that depends continuously on <span class="math notranslate nohighlight">\(t \in [0, T]\)</span> and satisfies:</p>
<ol class="arabic simple">
Expand Down Expand Up @@ -644,7 +645,7 @@ <h2>Evaluating a stochastic integral<a class="headerlink" href="#evaluating-a-st
<h2>Euler-Maruyama method<a class="headerlink" href="#euler-maruyama-method" title="Link to this heading">#</a></h2>
<p>The Euler-Maruyama method is the analoge of the Euler method for deterministic integrals, applied to the stochastic case.</p>
<div class="proof definition admonition" id="definition-1">
<p class="admonition-title"><span class="caption-number">Definition 76 </span> (Euler-Maruyama method)</p>
<p class="admonition-title"><span class="caption-number">Definition 75 </span> (Euler-Maruyama method)</p>
<section class="definition-content" id="proof-content">
<p>Given a scalar SDE with drift and diffusion functions <span class="math notranslate nohighlight">\(f\)</span> and <span class="math notranslate nohighlight">\(g\)</span></p>
<div class="math notranslate nohighlight">
Expand Down Expand Up @@ -764,7 +765,7 @@ <h2>Euler-Maruyama method<a class="headerlink" href="#euler-maruyama-method" tit
<h2>Strong and weak convergence<a class="headerlink" href="#strong-and-weak-convergence" title="Link to this heading">#</a></h2>
<p>Since the choice of the number of bins <span class="math notranslate nohighlight">\(N\)</span> of the discretisation affects the accuracy of our method, we are interested in how quickly the approximation converges to the exact solution as a function of <span class="math notranslate nohighlight">\(N\)</span>. To do so, we must first define <em>what convergence means</em> in the stochastic case, which leads us to two disctinct notions of convergence, the strong sence and the weak sense.</p>
<div class="proof definition admonition" id="definition-2">
<p class="admonition-title"><span class="caption-number">Definition 77 </span> (Strong convergence)</p>
<p class="admonition-title"><span class="caption-number">Definition 76 </span> (Strong convergence)</p>
<section class="definition-content" id="proof-content">
<p>A method for approximating a stochastic process <span class="math notranslate nohighlight">\(X(t)\)</span> is said to have strong order of convergence <span class="math notranslate nohighlight">\(\gamma\)</span> if there exists a constant such that</p>
<div class="math notranslate nohighlight">
Expand All @@ -774,7 +775,7 @@ <h2>Strong and weak convergence<a class="headerlink" href="#strong-and-weak-conv
</section>
</div><p>Strong convergence refers to the rate of convergence of the approximation <span class="math notranslate nohighlight">\(X_n\)</span> to the exact solution <span class="math notranslate nohighlight">\(X(\tau_n)\)</span> as <span class="math notranslate nohighlight">\(\Delta t \to 0\)</span>, in expectation. A weaker condition for convergence is rate at which the expected value of the approximation converges to the true expected value, as <span class="math notranslate nohighlight">\(\Delta t \to 0\)</span>, as given below.</p>
<div class="proof definition admonition" id="definition-3">
<p class="admonition-title"><span class="caption-number">Definition 78 </span> (Weak convergence)</p>
<p class="admonition-title"><span class="caption-number">Definition 77 </span> (Weak convergence)</p>
<section class="definition-content" id="proof-content">
<p>A method for approximating a stochastic process <span class="math notranslate nohighlight">\(X(t)\)</span> is said to have weak order of convergence <span class="math notranslate nohighlight">\(\gamma\)</span> if there exists a constant such that</p>
<div class="math notranslate nohighlight">
Expand All @@ -793,7 +794,7 @@ <h2>Strong and weak convergence<a class="headerlink" href="#strong-and-weak-conv
<h2>Milstein’s higher order method<a class="headerlink" href="#milstein-s-higher-order-method" title="Link to this heading">#</a></h2>
<p>Just as higher order methods for ODEs exist for obtaining refined estimates of the solution, so do methods for SDEs, such as Milstein’s higher order method.</p>
<div class="proof definition admonition" id="definition-4">
<p class="admonition-title"><span class="caption-number">Definition 79 </span> (Milstein’s method)</p>
<p class="admonition-title"><span class="caption-number">Definition 78 </span> (Milstein’s method)</p>
<section class="definition-content" id="proof-content">
<p>Given a scalar SDE with drift and diffusion functions <span class="math notranslate nohighlight">\(f\)</span> and <span class="math notranslate nohighlight">\(g\)</span></p>
<div class="math notranslate nohighlight">
Expand Down Expand Up @@ -833,7 +834,7 @@ <h2>Stochastic chain rule<a class="headerlink" href="#stochastic-chain-rule" tit
\end{align}\]</div>
<p>For an autonomous SDE however the chain rule takes a different form, which under the Ito definition is as follows.</p>
<div class="proof theorem admonition" id="theorem-5">
<p class="admonition-title"><span class="caption-number">Theorem 95 </span> (Ito’s result for one dimension)</p>
<p class="admonition-title"><span class="caption-number">Theorem 92 </span> (Ito’s result for one dimension)</p>
<section class="theorem-content" id="proof-content">
<p>Let <span class="math notranslate nohighlight">\(X_t\)</span> be an Ito process given by</p>
<div class="math notranslate nohighlight">
Expand Down Expand Up @@ -966,7 +967,7 @@ <h2>References<a class="headerlink" href="#references" title="Link to this headi
</div>
<nav class="bd-toc-nav page-toc">
<ul class="visible nav section-nav flex-column">
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#why-stochastic-differential-equations">Why stochastic differential equations</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#why-stochastic-differential-equations">Why Stochastic differential equations</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#the-wiener-process">The Wiener process</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#sampling-from-a-wiener-process">Sampling from a Wiener process</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#function-of-a-wiener-process">Function of a Wiener process</a></li>
Expand Down
Loading

0 comments on commit a859448

Please sign in to comment.