Skip to content

Commit 9945107

Browse files
committed
polish text
1 parent 3c69714 commit 9945107

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

index.qmd

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ description: |
1313

1414
::: {.panel}
1515
##### Expressive {.panel-title .pb-1}
16-
Turing models are easy to write and communicate — their syntax closely resembles mathematical notation.
16+
Turing models are easy to write and communicate.
1717
:::
1818

1919
::: {.panel}
@@ -123,16 +123,16 @@ sample(model, externalsampler(SliceSteppingOut(2.0)), 1000)
123123
<div class="fs-4 fw-bold pb-1">Composability with Julia</div>
124124

125125
As Turing.jl models are simply Julia functions under the hood, they can contain arbitrary Julia code.
126+
This allows users to draw on the rich numerical and scientific computing ecosystem of Julia.
126127

127-
For example, [differential equations](https://turinglang.org/docs/tutorials/bayesian-differential-equations/) can be added to a model using the `DifferentialEquations.jl` Julia package.
128+
In the example here, we define an [ordinary differential equations](https://turinglang.org/docs/tutorials/bayesian-differential-equations/) using the `DifferentialEquations.jl` Julia package and use it in a Turing.jl model.
128129

129130
:::
130131

131132
::: {.example-code style="overflow-x: scroll;"}
132133
```{.julia .code-overflow-scroll}
133-
using DifferentialEquations
134-
135134
# Define the system of equations
135+
using DifferentialEquations
136136
function lotka_volterra(du, u, params, t)
137137
α, β, δ, γ = params
138138
x, y = u
@@ -143,14 +143,11 @@ prob = ODEProblem(lotka_volterra, ...)
143143
144144
# Use it in a model
145145
@model function fit_lotka_volterra()
146-
# Priors
147-
α ~ Normal(0, 1)
148-
# ...
149-
146+
# Priors on ODE parameters
147+
α ~ Normal(0, 1) # and others...
150148
# Solve the ODE
151-
predictions = solve(prob, Tsit5(); p=p)
152-
153-
# Likelihood
149+
predictions = solve(prob, Tsit5(); params=(α, ...))
150+
# Calculate likelihood
154151
data ~ Poisson.(predictions, ...)
155152
end
156153
```

0 commit comments

Comments
 (0)