Commit 5d8c423e authored by Bentriou Mahmoud's avatar Bentriou Mahmoud
Browse files

fix in plots of third notebook

parent ed3f850c
%% Cell type:markdown id: tags:
# ABC-SMC with ContinuousTimeModel
The package allows the run of ABC-SMC algorithm with models defined by the package.
%% Cell type:code id: tags:
``` julia
using MarkovProcesses
using Distributions
set_time_bound!(SIR, 100.0)
parametric_SIR = ParametricModel(SIR, (:ki, Uniform(0.001, 0.0015)))
vec_observations = [simulate(SIR)]
function dist_obs(vec_sim::Vector{Trajectory}, vec_observations::Vector{Trajectory})
return dist_lp(vec_sim[1], vec_observations[1]; p=2)
epsilon = 0.5 * dist_obs([simulate(SIR)], vec_observations)
@show epsilon
res_abc = abc_smc(parametric_SIR, vec_observations, dist_obs, nbr_particles = 100, tolerance = epsilon)
%% Cell type:code id: tags:
``` julia
using Plots
histogram(res_abc.mat_p_end, weights = res_abc.weights_end)
histogram(vec(res_abc.mat_p_end), weights = res_abc.weights)
%% Cell type:code id: tags:
``` julia
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment