Skip to content

Commit

Permalink
Align timesteps
Browse files Browse the repository at this point in the history
  • Loading branch information
FredericWantiez committed Mar 25, 2024
1 parent aef19fa commit 804bda0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions examples/levy-ssm/script.jl
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ N = 200
ts = range(start, finish; length=N)
seed = 4
rng = Random.MersenneTwister(seed)
Np = 10
Ns = 10
Np = 50
Ns = 100

f(dt, θ) = exp* dt)
function Base.exp(dyn::LangevinDynamics, dt::Real)
Expand Down Expand Up @@ -242,14 +242,15 @@ std_trajectory = dropdims(std(stack(marginal_states); dims=3); dims=3)
ps = []
for d in 1:2
p = plot(
ts,
mean_trajectory[:, d];
ribbon=2 * std_trajectory[:, d]',
color=:darkorange,
label="Mean Trajectory (±2σ)",
fillalpha=0.2,
title="Marginal State Trajectories (X$d)",
)
plot!(p, X[:, d]; color=:dodgerblue, label="True Trajectory")
plot!(p, ts, X[:, d]; color=:dodgerblue, label="True Trajectory")
push!(ps, p)
end
plot(ps...; layout=(2, 1), size=(600, 600))

0 comments on commit 804bda0

Please sign in to comment.