Skip to content

Commit 6996798

Browse files
committed
Fix update rate calculation
1 parent 8b9d215 commit 6996798

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

examples/gaussian-ssm/script.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ plot!(y; seriestype=:scatter, label="y", xlabel="t", mc=:red, ms=2, ma=0.5)
8080

8181
# `AdvancedPS` subscribes to the `AbstractMCMC` API. To sample we just need to define a Particle Gibbs kernel
8282
# and a model interface.
83-
pgas = AdvancedPS.PGAS(20)
83+
N = 20
84+
pgas = AdvancedPS.PGAS(N)
8485
chains = sample(rng, AdvancedPS.TracedSSM(true_model, y), pgas, 500; progress=false);
8586
#md nothing #hide
8687

@@ -109,4 +110,4 @@ plot(
109110
xlabel="Iteration",
110111
ylabel="Update rate",
111112
)
112-
hline!([1 - 1 / length(chains)]; label="N: $(length(chains))")
113+
hline!([1 - 1 / N]; label="N: $(N)")

0 commit comments

Comments
 (0)