You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Alternatively, you can set the global RNG using `Random.seed!()`, although we recommend this less as it modifies global state.
72
+
73
+
```{julia}
74
+
Random.seed!(468)
75
+
chn3 = sample(demo_model(), MH(), 5);
76
+
Random.seed!(468)
77
+
chn4 = sample(demo_model(), MH(), 5);
78
+
(chn3[:x] == chn4[:x], chn3[:y] == chn4[:y])
79
+
```
80
+
81
+
::: {.callout-note}
82
+
The outputs of pseudorandom number generators in the standard `Random` library are not guaranteed to be the same across different Julia versions or platforms.
83
+
If you require absolute reproducibility, you should use [the StableRNGs.jl package](https://github.com/JuliaRandom/StableRNGs.jl).
84
+
:::
85
+
60
86
## Switching the output type
61
87
62
88
By default, the results of MCMC sampling are bundled up in an `MCMCChains.Chains` object.
@@ -145,7 +171,6 @@ This is useful to, for example, perform sampling in batches, or to inspect inter
145
171
Firstly, the previous chain _must_ have been run using the `save_state=true` argument.
0 commit comments