Skip to content

Commit d32edc0

Browse files
committed
upgrade Turing and DynamicPPL
1 parent db1b093 commit d32edc0

2 files changed

Lines changed: 9 additions & 7 deletions

File tree

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "SequentialSamplingModels"
22
uuid = "0e71a2a6-2b30-4447-8742-d083a85e82d1"
33
authors = ["itsdfish"]
4-
version = "0.13.0"
4+
version = "0.13.1"
55

66
[deps]
77
ArgCheck = "dce04be8-c92d-5529-be00-80e4d2c0e197"

docs/src/predictive_distributions.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,15 @@ using TuringUtilities
2020
Random.seed!(1124)
2121

2222
n_samples = 50
23-
rts = rand(Wald= 1.5, α = 0.8, τ = 0.3), n_samples)
23+
rts = rand(Wald= 1.5, α = 0.8, τ = 0.3, η = 0.0), n_samples)
2424

2525
@model function wald_model(rts)
2626
ν ~ truncated(Normal(1.5, 1), 0, Inf)
2727
α ~ truncated(Normal(0.8, 1), 0, Inf)
2828
τ = 0.3
29-
rts ~ Wald(ν, α, τ)
30-
return (; ν, α, τ)
29+
η = eps()
30+
rts ~ Wald(; ν, η, α, τ)
31+
return (; ν, η, α, τ)
3132
end
3233

3334
model = wald_model(rts)
@@ -96,7 +97,7 @@ Random.seed!(1124)
9697
We will use the [Wald](wald.md) model as a simple example to illustrate how to create predictive distributions. The `Wald` model describes the evidence accumulation process underlying single detection decisions, such as respending when a stimulus appears. In the code block below, we will generate 50 data points.
9798
```julia
9899
n_samples = 50
99-
rts = rand(Wald= 1.5, α = 0.8, τ = 0.3), n_samples)
100+
rts = rand(Wald= 1.5, α = 0.8, τ = 0.3, η = 0.0), n_samples)
100101
```
101102

102103
## Define Turing Model
@@ -108,8 +109,9 @@ Next, we will develop a Turing model for generating prior and posterior predicti
108109
ν ~ truncated(Normal(1.5, 1), 0, Inf)
109110
α ~ truncated(Normal(0.8, 1), 0, Inf)
110111
τ = 0.3
111-
rts ~ Wald(ν, α, τ)
112-
return (; ν, α, τ)
112+
η = eps()
113+
rts ~ Wald(; ν, η, α, τ)
114+
return (; ν, η, α, τ)
113115
end
114116
```
115117
In the next code block, we will pass the data and create a model object.

0 commit comments

Comments
 (0)