Skip to content

Commit 0ffc702

Browse files
committed
Use InitFromParams from latest Turing 0.41.0
1 parent 2ffa279 commit 0ffc702

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/src/parameter_fitting.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ nothing # hide
122122
```
123123
We can now sample from the model to obtain a MCMC chain for the ΛCDM model:
124124
```@example fit
125-
chain = sample(sn_ΛCDM, NUTS(), 1000; initial_params = (h = 0.7, Ωm0 = 0.3, Ωk0 = 0.01))
125+
chain = sample(sn_ΛCDM, NUTS(), 1000; initial_params = InitFromParams((h = 0.7, Ωm0 = 0.3, Ωk0 = 0.01)))
126126
@assert all(std(Array(chain); dims = 1) .> 0) # hide
127127
import Plots, StatsPlots # don't collide with Makie
128128
Plots.plot(chain)
@@ -144,7 +144,7 @@ We can easily repeat this for another model:
144144
```@example fit
145145
sn_w0CDM_flat = fix(sn_w0waCDM, Ωk0 = 0.0, wa = 0.0);
146146
# TODO: describe Turing model more, e.g. loglikelihood(sn_fc, (h = 0.70, Ωm0 = 0.26, Ωk0 = 0.10, w0 = -1.01, wa = -0.07)) # hide
147-
chain = sample(sn_w0CDM_flat, NUTS(), 1000; initial_params = (h = 0.5, Ωm0 = 0.5, w0 = -1.0))
147+
chain = sample(sn_w0CDM_flat, NUTS(), 1000; initial_params = InitFromParams((h = 0.5, Ωm0 = 0.5, w0 = -1.0)))
148148
@assert all(std(Array(chain); dims = 1) .> 0) # hide
149149
pp = pairplot(chain => layout)
150150
```

0 commit comments

Comments
 (0)