Skip to content

Commit 747b1c6

Browse files
Publish docs @ c722e96
1 parent 6c84ad2 commit 747b1c6

File tree

10 files changed

+214
-206
lines changed

10 files changed

+214
-206
lines changed

core-functionality/index.html

Lines changed: 39 additions & 35 deletions
Large diffs are not rendered by default.

search.json

Lines changed: 6 additions & 6 deletions
Large diffs are not rendered by default.

search_original.json

Lines changed: 6 additions & 6 deletions
Large diffs are not rendered by default.

sitemap.xml

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -2,190 +2,190 @@
22
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
33
<url>
44
<loc>https://turinglang.org/docs/changelog.html</loc>
5-
<lastmod>2025-09-26T14:49:51.965Z</lastmod>
5+
<lastmod>2025-09-26T16:55:51.809Z</lastmod>
66
</url>
77
<url>
88
<loc>https://turinglang.org/docs/tutorials/bayesian-neural-networks/index.html</loc>
9-
<lastmod>2025-09-26T14:35:00.612Z</lastmod>
9+
<lastmod>2025-09-26T16:39:14.142Z</lastmod>
1010
</url>
1111
<url>
1212
<loc>https://turinglang.org/docs/tutorials/multinomial-logistic-regression/index.html</loc>
13-
<lastmod>2025-09-26T14:35:00.612Z</lastmod>
13+
<lastmod>2025-09-26T16:39:14.143Z</lastmod>
1414
</url>
1515
<url>
1616
<loc>https://turinglang.org/docs/tutorials/gaussian-mixture-models/index.html</loc>
17-
<lastmod>2025-09-26T14:35:00.612Z</lastmod>
17+
<lastmod>2025-09-26T16:39:14.142Z</lastmod>
1818
</url>
1919
<url>
2020
<loc>https://turinglang.org/docs/tutorials/bayesian-time-series-analysis/index.html</loc>
21-
<lastmod>2025-09-26T14:35:00.612Z</lastmod>
21+
<lastmod>2025-09-26T16:39:14.142Z</lastmod>
2222
</url>
2323
<url>
2424
<loc>https://turinglang.org/docs/tutorials/variational-inference/index.html</loc>
25-
<lastmod>2025-09-26T14:35:00.612Z</lastmod>
25+
<lastmod>2025-09-26T16:39:14.143Z</lastmod>
2626
</url>
2727
<url>
2828
<loc>https://turinglang.org/docs/tutorials/infinite-mixture-models/index.html</loc>
29-
<lastmod>2025-09-26T14:35:00.612Z</lastmod>
29+
<lastmod>2025-09-26T16:39:14.143Z</lastmod>
3030
</url>
3131
<url>
3232
<loc>https://turinglang.org/docs/tutorials/bayesian-logistic-regression/index.html</loc>
33-
<lastmod>2025-09-26T14:35:00.612Z</lastmod>
33+
<lastmod>2025-09-26T16:39:14.142Z</lastmod>
3434
</url>
3535
<url>
3636
<loc>https://turinglang.org/docs/tutorials/bayesian-poisson-regression/index.html</loc>
37-
<lastmod>2025-09-26T14:35:00.612Z</lastmod>
37+
<lastmod>2025-09-26T16:39:14.142Z</lastmod>
3838
</url>
3939
<url>
4040
<loc>https://turinglang.org/docs/uri/troubleshooting.html</loc>
41-
<lastmod>2025-09-26T14:35:00.613Z</lastmod>
41+
<lastmod>2025-09-26T16:39:14.143Z</lastmod>
4242
</url>
4343
<url>
4444
<loc>https://turinglang.org/docs/developers/compiler/minituring-contexts/index.html</loc>
45-
<lastmod>2025-09-26T14:35:00.607Z</lastmod>
45+
<lastmod>2025-09-26T16:39:14.136Z</lastmod>
4646
</url>
4747
<url>
4848
<loc>https://turinglang.org/docs/developers/compiler/model-manual/index.html</loc>
49-
<lastmod>2025-09-26T14:35:00.607Z</lastmod>
49+
<lastmod>2025-09-26T16:39:14.136Z</lastmod>
5050
</url>
5151
<url>
5252
<loc>https://turinglang.org/docs/developers/contexts/submodel-condition/index.html</loc>
53-
<lastmod>2025-09-26T14:35:00.607Z</lastmod>
53+
<lastmod>2025-09-26T16:39:14.136Z</lastmod>
5454
</url>
5555
<url>
5656
<loc>https://turinglang.org/docs/developers/transforms/dynamicppl/index.html</loc>
57-
<lastmod>2025-09-26T14:35:00.611Z</lastmod>
57+
<lastmod>2025-09-26T16:39:14.141Z</lastmod>
5858
</url>
5959
<url>
6060
<loc>https://turinglang.org/docs/developers/contributing/index.html</loc>
61-
<lastmod>2025-09-26T14:35:00.607Z</lastmod>
61+
<lastmod>2025-09-26T16:39:14.136Z</lastmod>
6262
</url>
6363
<url>
6464
<loc>https://turinglang.org/docs/developers/inference/abstractmcmc-turing/index.html</loc>
65-
<lastmod>2025-09-26T14:35:00.607Z</lastmod>
65+
<lastmod>2025-09-26T16:39:14.137Z</lastmod>
6666
</url>
6767
<url>
6868
<loc>https://turinglang.org/docs/developers/inference/implementing-samplers/index.html</loc>
69-
<lastmod>2025-09-26T14:35:00.607Z</lastmod>
69+
<lastmod>2025-09-26T16:39:14.137Z</lastmod>
7070
</url>
7171
<url>
7272
<loc>https://turinglang.org/docs/usage/performance-tips/index.html</loc>
73-
<lastmod>2025-09-26T14:35:00.613Z</lastmod>
73+
<lastmod>2025-09-26T16:39:14.144Z</lastmod>
7474
</url>
7575
<url>
7676
<loc>https://turinglang.org/docs/usage/custom-distribution/index.html</loc>
77-
<lastmod>2025-09-26T14:35:00.613Z</lastmod>
77+
<lastmod>2025-09-26T16:39:14.143Z</lastmod>
7878
</url>
7979
<url>
8080
<loc>https://turinglang.org/docs/usage/mode-estimation/index.html</loc>
81-
<lastmod>2025-09-26T14:35:00.613Z</lastmod>
81+
<lastmod>2025-09-26T16:39:14.144Z</lastmod>
8282
</url>
8383
<url>
8484
<loc>https://turinglang.org/docs/usage/submodels/index.html</loc>
85-
<lastmod>2025-09-26T14:35:00.613Z</lastmod>
85+
<lastmod>2025-09-26T16:39:14.144Z</lastmod>
8686
</url>
8787
<url>
8888
<loc>https://turinglang.org/docs/usage/external-samplers/index.html</loc>
89-
<lastmod>2025-09-26T14:35:00.613Z</lastmod>
89+
<lastmod>2025-09-26T16:39:14.144Z</lastmod>
9090
</url>
9191
<url>
9292
<loc>https://turinglang.org/docs/usage/sampler-visualisation/index.html</loc>
93-
<lastmod>2025-09-26T14:35:00.613Z</lastmod>
93+
<lastmod>2025-09-26T16:39:14.144Z</lastmod>
9494
</url>
9595
<url>
9696
<loc>https://turinglang.org/docs/faq/index.html</loc>
97-
<lastmod>2025-09-26T14:35:00.611Z</lastmod>
97+
<lastmod>2025-09-26T16:39:14.141Z</lastmod>
9898
</url>
9999
<url>
100100
<loc>https://turinglang.org/docs/usage/modifying-logprob/index.html</loc>
101-
<lastmod>2025-09-26T14:35:00.613Z</lastmod>
101+
<lastmod>2025-09-26T16:39:14.144Z</lastmod>
102102
</url>
103103
<url>
104104
<loc>https://turinglang.org/docs/usage/automatic-differentiation/index.html</loc>
105-
<lastmod>2025-09-26T14:35:00.613Z</lastmod>
105+
<lastmod>2025-09-26T16:39:14.143Z</lastmod>
106106
</url>
107107
<url>
108108
<loc>https://turinglang.org/docs/usage/tracking-extra-quantities/index.html</loc>
109-
<lastmod>2025-09-26T14:35:00.613Z</lastmod>
109+
<lastmod>2025-09-26T16:39:14.144Z</lastmod>
110110
</url>
111111
<url>
112112
<loc>https://turinglang.org/docs/usage/dynamichmc/index.html</loc>
113-
<lastmod>2025-09-26T14:35:00.613Z</lastmod>
113+
<lastmod>2025-09-26T16:39:14.144Z</lastmod>
114114
</url>
115115
<url>
116116
<loc>https://turinglang.org/docs/usage/troubleshooting/index.html</loc>
117-
<lastmod>2025-09-26T14:35:00.613Z</lastmod>
117+
<lastmod>2025-09-26T16:39:14.144Z</lastmod>
118118
</url>
119119
<url>
120120
<loc>https://turinglang.org/docs/usage/probability-interface/index.html</loc>
121-
<lastmod>2025-09-26T14:35:00.613Z</lastmod>
121+
<lastmod>2025-09-26T16:39:14.144Z</lastmod>
122122
</url>
123123
<url>
124124
<loc>https://turinglang.org/docs/versions.html</loc>
125-
<lastmod>2025-09-26T14:49:52.099Z</lastmod>
125+
<lastmod>2025-09-26T16:55:51.928Z</lastmod>
126126
</url>
127127
<url>
128128
<loc>https://turinglang.org/docs/developers/inference/variational-inference/index.html</loc>
129-
<lastmod>2025-09-26T14:35:00.607Z</lastmod>
129+
<lastmod>2025-09-26T16:39:14.137Z</lastmod>
130130
</url>
131131
<url>
132132
<loc>https://turinglang.org/docs/developers/inference/abstractmcmc-interface/index.html</loc>
133-
<lastmod>2025-09-26T14:35:00.607Z</lastmod>
133+
<lastmod>2025-09-26T16:39:14.136Z</lastmod>
134134
</url>
135135
<url>
136136
<loc>https://turinglang.org/docs/developers/transforms/distributions/index.html</loc>
137-
<lastmod>2025-09-26T14:35:00.608Z</lastmod>
137+
<lastmod>2025-09-26T16:39:14.137Z</lastmod>
138138
</url>
139139
<url>
140140
<loc>https://turinglang.org/docs/developers/transforms/bijectors/index.html</loc>
141-
<lastmod>2025-09-26T14:35:00.607Z</lastmod>
141+
<lastmod>2025-09-26T16:39:14.137Z</lastmod>
142142
</url>
143143
<url>
144144
<loc>https://turinglang.org/docs/developers/compiler/minituring-compiler/index.html</loc>
145-
<lastmod>2025-09-26T14:35:00.607Z</lastmod>
145+
<lastmod>2025-09-26T16:39:14.136Z</lastmod>
146146
</url>
147147
<url>
148148
<loc>https://turinglang.org/docs/developers/compiler/design-overview/index.html</loc>
149-
<lastmod>2025-09-26T14:35:00.606Z</lastmod>
149+
<lastmod>2025-09-26T16:39:14.136Z</lastmod>
150150
</url>
151151
<url>
152152
<loc>https://turinglang.org/docs/uri/initial-parameters.html</loc>
153-
<lastmod>2025-09-26T14:35:00.613Z</lastmod>
153+
<lastmod>2025-09-26T16:39:14.143Z</lastmod>
154154
</url>
155155
<url>
156156
<loc>https://turinglang.org/docs/getting-started/index.html</loc>
157-
<lastmod>2025-09-26T14:35:00.611Z</lastmod>
157+
<lastmod>2025-09-26T16:39:14.141Z</lastmod>
158158
</url>
159159
<url>
160160
<loc>https://turinglang.org/docs/tutorials/hidden-markov-models/index.html</loc>
161-
<lastmod>2025-09-26T14:35:00.612Z</lastmod>
161+
<lastmod>2025-09-26T16:39:14.143Z</lastmod>
162162
</url>
163163
<url>
164164
<loc>https://turinglang.org/docs/tutorials/gaussian-processes-introduction/index.html</loc>
165-
<lastmod>2025-09-26T14:35:00.612Z</lastmod>
165+
<lastmod>2025-09-26T16:39:14.142Z</lastmod>
166166
</url>
167167
<url>
168168
<loc>https://turinglang.org/docs/tutorials/probabilistic-pca/index.html</loc>
169-
<lastmod>2025-09-26T14:35:00.612Z</lastmod>
169+
<lastmod>2025-09-26T16:39:14.143Z</lastmod>
170170
</url>
171171
<url>
172172
<loc>https://turinglang.org/docs/tutorials/gaussian-process-latent-variable-models/index.html</loc>
173-
<lastmod>2025-09-26T14:35:00.612Z</lastmod>
173+
<lastmod>2025-09-26T16:39:14.142Z</lastmod>
174174
</url>
175175
<url>
176176
<loc>https://turinglang.org/docs/tutorials/bayesian-linear-regression/index.html</loc>
177-
<lastmod>2025-09-26T14:35:00.611Z</lastmod>
177+
<lastmod>2025-09-26T16:39:14.142Z</lastmod>
178178
</url>
179179
<url>
180180
<loc>https://turinglang.org/docs/tutorials/coin-flipping/index.html</loc>
181-
<lastmod>2025-09-26T14:35:00.612Z</lastmod>
181+
<lastmod>2025-09-26T16:39:14.142Z</lastmod>
182182
</url>
183183
<url>
184184
<loc>https://turinglang.org/docs/tutorials/bayesian-differential-equations/index.html</loc>
185-
<lastmod>2025-09-26T14:35:00.611Z</lastmod>
185+
<lastmod>2025-09-26T16:39:14.142Z</lastmod>
186186
</url>
187187
<url>
188188
<loc>https://turinglang.org/docs/core-functionality/index.html</loc>
189-
<lastmod>2025-09-26T14:35:00.606Z</lastmod>
189+
<lastmod>2025-09-26T16:39:14.136Z</lastmod>
190190
</url>
191191
</urlset>

tutorials/bayesian-differential-equations/index.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,7 @@ <h2 class="anchored" data-anchor-id="the-lotkavolterra-model">The Lotka–Volter
859859
<h2 class="anchored" data-anchor-id="direct-handling-of-bayesian-estimation-with-turing">Direct Handling of Bayesian Estimation with Turing</h2>
860860
<p><a href="https://docs.sciml.ai/DiffEqDocs/stable/">DifferentialEquations.jl</a> is the main Julia package for numerically solving differential equations. Its functionality is completely interoperable with Turing.jl, which means that we can directly simulate differential equations inside a Turing <code>@model</code>.</p>
861861
<p>For the purposes of this tutorial, we choose priors for the parameters that are quite close to the ground truth. As justification, we can imagine we have preexisting estimates for the biological rates. Practically, this helps us to illustrate the results without needing to run overly long MCMC chains.</p>
862-
<p>Note we also have to take special care with the ODE solver. For certain parameter combinations, the numerical solver may predict animal densities that are just barely below zero. This causes errors with the Poisson distribution, which needs a non-negative mean <span class="math inline">\(\lambda\)</span>. To avoid this happening, we tell the solver to aim for small abolute and relative errors (<code>abstol=1e-6, reltol=1e-6</code>). We also add a fudge factor <code>ϵ = 1e-5</code> to the predicted data. Since <code>ϵ</code> is greater than the solver’s tolerance, it should overcome any remaining numerical error, making sure all predicted values are positive. At the same time, it is so small compared to the data that it should have a negligible effect on inference. If this approach doesn’t work, there are some more ideas to try <a href="https://docs.sciml.ai/DiffEqDocs/stable/basics/faq/#My-ODE-goes-negative-but-should-stay-positive,-what-tools-can-help?">here</a>.</p>
862+
<p>Note we also have to take special care with the ODE solver. For certain parameter combinations, the numerical solver may predict animal densities that are just barely below zero. This causes errors with the Poisson distribution, which needs a non-negative mean <span class="math inline">\(\lambda\)</span>. To avoid this happening, we tell the solver to aim for small absolute and relative errors (<code>abstol=1e-6, reltol=1e-6</code>). We also add a fudge factor <code>ϵ = 1e-5</code> to the predicted data. Since <code>ϵ</code> is greater than the solver’s tolerance, it should overcome any remaining numerical error, making sure all predicted values are positive. At the same time, it is so small compared to the data that it should have a negligible effect on inference. If this approach doesn’t work, there are some more ideas to try <a href="https://docs.sciml.ai/DiffEqDocs/stable/basics/faq/#My-ODE-goes-negative-but-should-stay-positive,-what-tools-can-help?">here</a>. In the case of continuous observations (e.g.&nbsp;data derived from modelling chemical reactions), it is sufficient to use a normal distribution with the mean as the data point and an appropriately chosen variance (which can itself also be a parameter with a prior distribution).</p>
863863
<div id="10" class="cell" data-execution_count="1">
864864
<div class="code-copy-outer-scaffold"><div class="sourceCode cell-code" id="cb4"><pre class="sourceCode julia code-with-copy"><code class="sourceCode julia"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="pp">@model</span> <span class="kw">function</span> <span class="fu">fitlv</span>(data, prob)</span>
865865
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a> <span class="co"># Prior distributions.</span></span>
@@ -903,8 +903,8 @@ <h2 class="anchored" data-anchor-id="direct-handling-of-bayesian-estimation-with
903903
Iterations = 501:1:1500
904904
Number of chains = 3
905905
Samples per chain = 1000
906-
Wall duration = 51.56 seconds
907-
Compute duration = 47.9 seconds
906+
Wall duration = 52.06 seconds
907+
Compute duration = 48.05 seconds
908908
parameters = α, β, γ, δ, q
909909
internals = n_steps, is_accept, acceptance_rate, log_density, hamiltonian_energy, hamiltonian_energy_error, max_hamiltonian_energy_error, tree_depth, numerical_error, step_size, nom_step_size, lp, logprior, loglikelihood
910910

@@ -983,8 +983,8 @@ <h2 class="anchored" data-anchor-id="lotkavolterra-model-without-data-of-prey">L
983983
Iterations = 1001:1:6000
984984
Number of chains = 3
985985
Samples per chain = 5000
986-
Wall duration = 28.73 seconds
987-
Compute duration = 28.28 seconds
986+
Wall duration = 29.65 seconds
987+
Compute duration = 29.15 seconds
988988
parameters = α, β, γ, δ, q
989989
internals = n_steps, is_accept, acceptance_rate, log_density, hamiltonian_energy, hamiltonian_energy_error, max_hamiltonian_energy_error, tree_depth, numerical_error, step_size, nom_step_size, lp, logprior, loglikelihood
990990

@@ -1095,8 +1095,8 @@ <h2 class="anchored" data-anchor-id="inference-of-delay-differential-equations">
10951095
Iterations = 151:1:450
10961096
Number of chains = 3
10971097
Samples per chain = 300
1098-
Wall duration = 12.55 seconds
1099-
Compute duration = 12.32 seconds
1098+
Wall duration = 12.98 seconds
1099+
Compute duration = 12.73 seconds
11001100
parameters = α, β, γ, δ, q
11011101
internals = n_steps, is_accept, acceptance_rate, log_density, hamiltonian_energy, hamiltonian_energy_error, max_hamiltonian_energy_error, tree_depth, numerical_error, step_size, nom_step_size, lp, logprior, loglikelihood
11021102

@@ -1154,8 +1154,8 @@ <h2 class="anchored" data-anchor-id="scaling-to-large-models-adjoint-sensitiviti
11541154
Iterations = 501:1:1500
11551155
Number of chains = 1
11561156
Samples per chain = 1000
1157-
Wall duration = 264.41 seconds
1158-
Compute duration = 264.41 seconds
1157+
Wall duration = 278.7 seconds
1158+
Compute duration = 278.7 seconds
11591159
parameters = α, β, γ, δ, q
11601160
internals = n_steps, is_accept, acceptance_rate, log_density, hamiltonian_energy, hamiltonian_energy_error, max_hamiltonian_energy_error, tree_depth, numerical_error, step_size, nom_step_size, lp, logprior, loglikelihood
11611161

versions/v0.40.3/core-functionality/index.html

Lines changed: 39 additions & 35 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)