Skip to content

Commit d4aaa18

Browse files
committed
Add changelog
1 parent 25c6513 commit d4aaa18

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

HISTORY.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,26 @@
22

33
## DynamicPPL 0.38
44

5-
Lorem ipsum dynamicppl sit amet
5+
Turing.jl v0.41 brings with it all the underlying changes in DynamicPPL 0.38.
6+
7+
The only user-facing difference is that initial parameters for MCMC sampling must now be specified in a different form.
8+
You still need to use the `initial_params` keyword argument to `sample`, but the allowed values are different.
9+
For almost all samplers in Turing.jl (except `Emcee`) this should now be a `DynamicPPL.AbstractInitStrategy`.
10+
11+
TODO LINK TO DPPL DOCS WHEN THIS IS LIVE
12+
13+
There are three kinds of initialisation strategies provided out of the box with Turing.jl (they are exported so you can use these directly with `using Turing`):
14+
15+
- `InitFromPrior()`: Sample from the prior distribution. This is the default for most samplers in Turing.jl (if you don't specify `initial_params`).
16+
- `InitFromUniform(a, b)`: Sample uniformly from `[a, b]` in linked space. This is the default for Hamiltonian samplers. If `a` and `b` are not specified it defaults to `[-2, 2]`, which preserves the behaviour in previous versions (and mimics that of Stan).
17+
- `InitFromParams(p)`: Explicitly provide a set of initial parameters. **Note: `p` must be either a `NamedTuple` or a `Dict{<:VarName}`; it can no longer be a `Vector`.** Parameters must be provided in unlinked space, even if the sampler later performs linking.
18+
19+
This change is made because Vectors are semantically ambiguous.
20+
It is not clear which element of the vector corresponds to which variable in the model, nor is it clear whether the parameters are in linked or unlinked space.
21+
Previously, both of these would depend on the internal structure of the VarInfo, which is an implementation detail.
22+
In contrast, the behaviour of `Dict`s and `NamedTuple`s is invariant to the ordering of variables and it is also easier for readers to understand which variable is being set to which value.
23+
24+
If you were previously using `varinfo[:]` to extract a vector of initial parameters, you can now use `Dict(k => varinfo[k] for k in keys(varinfo)` to extract a Dict of initial parameters.
625

726
## Initial step in MCMC sampling
827

0 commit comments

Comments
 (0)