Skip to content

Commit 39ae66b

Browse files
authored
docs: mention what weight_seq is for in examples/interfaces.jl (#141)
1 parent ec8328a commit 39ae66b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

examples/interfaces.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ They only need to implement three methods:
2828
- `DensityInterface.logdensityof(dist, obs)` for inference
2929
- `StatsAPI.fit!(dist, obs_seq, weight_seq)` for learning
3030
31+
When learning, the one-state marginal $ \gamma_{i,t} = \mathbb{P}(X_t=i | Y_{1:T}) $ will be passed to `StatsAPI.fit!` through the `weight_seq` argument.
32+
This is analogous to the weights vector accepted by `Distributions.fit_mle`; see [juliastats.org/Distributions.jl/stable/fit/#Maximum-Likelihood-Estimation](https://juliastats.org/Distributions.jl/stable/fit/#Distributions.fit_mle-Tuple%7BAny,%20Any,%20Any%7D)
33+
3134
In addition, the observations can be arbitrary Julia types.
3235
So let's construct a distribution that generates stuff.
3336
=#

0 commit comments

Comments
 (0)