From 7d13c349e33816ddcc08e720898cc6fb15005e18 Mon Sep 17 00:00:00 2001
From: "Documenter.jl" <documenter@juliadocs.github.io>
Date: Wed, 8 Mar 2023 15:42:46 +0000
Subject: [PATCH] build based on c70afa9

---
 dev/api/abc.html                       | 10 +++++-----
 dev/api/model.html                     |  2 +-
 dev/api/plots.html                     |  2 +-
 dev/api/trajectory.html                |  2 +-
 dev/assets/documenter.js               | 16 +++++++++++-----
 dev/assets/search.js                   | 16 ++++++++++++++++
 dev/assets/themes/documenter-dark.css  | 26 +++++++++++++-------------
 dev/assets/themes/documenter-light.css | 26 +++++++++++++-------------
 dev/create_model.html                  |  4 ++--
 dev/index.html                         |  2 +-
 dev/search.html                        |  2 +-
 dev/search_index.js                    |  2 +-
 dev/starting.html                      |  4 ++--
 13 files changed, 68 insertions(+), 46 deletions(-)

diff --git a/dev/api/abc.html b/dev/api/abc.html
index 64a4a06..16f1f5d 100644
--- a/dev/api/abc.html
+++ b/dev/api/abc.html
@@ -1,12 +1,12 @@
 <!DOCTYPE html>
-<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Approximate Bayesian Computation · MarkovProcesses.jl</title><script data-outdated-warner src="../assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.044/juliamono.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.11/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../index.html"><img src="../assets/logo.png" alt="MarkovProcesses.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit"><a href="../index.html">MarkovProcesses.jl</a></span></div><form class="docs-search" action="../search.html"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../index.html">Home</a></li><li><a class="tocitem" href="../starting.html">Getting Started</a></li><li><a class="tocitem" href="../create_model.html">Create a model</a></li><li><span class="tocitem">API</span><ul><li><a class="tocitem" href="model.html">Model</a></li><li><a class="tocitem" href="trajectory.html">Trajectory</a></li><li class="is-active"><a class="tocitem" href="abc.html">Approximate Bayesian Computation</a></li><li><a class="tocitem" href="plots.html">Plots</a></li></ul></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li><a class="is-disabled">API</a></li><li class="is-active"><a href="abc.html">Approximate Bayesian Computation</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href="abc.html">Approximate Bayesian Computation</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com//blob/master/docs/src/api/abc.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Approximate-Bayesian-Computation-related-methods"><a class="docs-heading-anchor" href="#Approximate-Bayesian-Computation-related-methods">Approximate Bayesian Computation related methods</a><a id="Approximate-Bayesian-Computation-related-methods-1"></a><a class="docs-heading-anchor-permalink" href="#Approximate-Bayesian-Computation-related-methods" title="Permalink"></a></h1><article class="docstring"><header><a class="docstring-binding" id="MarkovProcesses.abc_smc-Tuple{ParametricModel, AbstractVector{T} where T, Function}" href="#MarkovProcesses.abc_smc-Tuple{ParametricModel, AbstractVector{T} where T, Function}"><code>MarkovProcesses.abc_smc</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">abc_smc(pm::ParametricModel, l_obs, func_dist; nbr_particles, alpha, kernel_type, NT
-        duration_time, bound_sim, sym_var_aut, verbose)</code></pre><p>Run the ABC-SMC algorithm with the pm parametric model. </p><p><code>func_dist(l_sim, l_obs)</code> is the distance function between simulations and observation,  it corresponds to <span>$\rho(\eta(y_sim), \eta(y_exp))\$</span>. <code>l_obs::Vector{&lt;:T2}</code> is a collection of observations. <code>dist</code> must have a signature of the form <code>func_dist(l_sim::Vector{T1}, l_obs::Vector{T2})</code>.</p><p>If <code>pm</code> is defined on a <code>ContinuousTimeModel</code>, then <code>T1</code> should verify <code>T1 &lt;: Trajectory</code>.</p><p>!!! Distance function and distributed ABC     If you use <code>abc_smc</code> with multiple workers, <code>dist</code> has to be defined      on every workers by using @everywhere.</p></div></section></article><article class="docstring"><header><a class="docstring-binding" id="MarkovProcesses.abc_model_choice_dataset-Tuple{Vector{var&quot;#s109&quot;} where var&quot;#s109&quot;&lt;:Union{Model, ParametricModel}, Any, Function, Function, Int64, Int64}" href="#MarkovProcesses.abc_model_choice_dataset-Tuple{Vector{var&quot;#s109&quot;} where var&quot;#s109&quot;&lt;:Union{Model, ParametricModel}, Any, Function, Function, Int64, Int64}"><code>MarkovProcesses.abc_model_choice_dataset</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">abc_model_choice_dataset(models,
+<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Approximate Bayesian Computation · MarkovProcesses.jl</title><script data-outdated-warner src="../assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.045/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.24/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../index.html"><img src="../assets/logo.png" alt="MarkovProcesses.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit"><a href="../index.html">MarkovProcesses.jl</a></span></div><form class="docs-search" action="../search.html"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../index.html">Home</a></li><li><a class="tocitem" href="../starting.html">Getting Started</a></li><li><a class="tocitem" href="../create_model.html">Create a model</a></li><li><span class="tocitem">API</span><ul><li><a class="tocitem" href="model.html">Model</a></li><li><a class="tocitem" href="trajectory.html">Trajectory</a></li><li class="is-active"><a class="tocitem" href="abc.html">Approximate Bayesian Computation</a></li><li><a class="tocitem" href="plots.html">Plots</a></li></ul></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li><a class="is-disabled">API</a></li><li class="is-active"><a href="abc.html">Approximate Bayesian Computation</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href="abc.html">Approximate Bayesian Computation</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com//blob/master/docs/src/api/abc.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Approximate-Bayesian-Computation-related-methods"><a class="docs-heading-anchor" href="#Approximate-Bayesian-Computation-related-methods">Approximate Bayesian Computation related methods</a><a id="Approximate-Bayesian-Computation-related-methods-1"></a><a class="docs-heading-anchor-permalink" href="#Approximate-Bayesian-Computation-related-methods" title="Permalink"></a></h1><article class="docstring"><header><a class="docstring-binding" id="MarkovProcesses.abc_smc-Tuple{ParametricModel, AbstractVector, Function}" href="#MarkovProcesses.abc_smc-Tuple{ParametricModel, AbstractVector, Function}"><code>MarkovProcesses.abc_smc</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">abc_smc(pm::ParametricModel, l_obs, func_dist; nbr_particles, alpha, kernel_type, NT
+        duration_time, bound_sim, sym_var_aut, verbose)</code></pre><p>Run the ABC-SMC algorithm with the pm parametric model. </p><p><code>func_dist(l_sim, l_obs)</code> is the distance function between simulations and observation,  it corresponds to <span>$\rho(\eta(y_sim), \eta(y_exp))\$</span>. <code>l_obs::Vector{&lt;:T2}</code> is a collection of observations. <code>dist</code> must have a signature of the form <code>func_dist(l_sim::Vector{T1}, l_obs::Vector{T2})</code>.</p><p>If <code>pm</code> is defined on a <code>ContinuousTimeModel</code>, then <code>T1</code> should verify <code>T1 &lt;: Trajectory</code>.</p><p>!!! Distance function and distributed ABC     If you use <code>abc_smc</code> with multiple workers, <code>dist</code> has to be defined      on every workers by using @everywhere.</p></div></section></article><article class="docstring"><header><a class="docstring-binding" id="MarkovProcesses.abc_model_choice_dataset-Tuple{Vector{&lt;:Union{Model, ParametricModel}}, Any, Function, Function, Int64, Int64}" href="#MarkovProcesses.abc_model_choice_dataset-Tuple{Vector{&lt;:Union{Model, ParametricModel}}, Any, Function, Function, Int64, Int64}"><code>MarkovProcesses.abc_model_choice_dataset</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">abc_model_choice_dataset(models,
                          summary_stats_observations,
                          summary_stats_func::Function, distance_func::Function,
-                         k::Int, N_ref::Int; dir_results::Union{Nothing,String} = nothing)</code></pre><p>Creates a reference table for ABC model choice with discrete uniform prior distribution over the models.</p></div></section></article><article class="docstring"><header><a class="docstring-binding" id="MarkovProcesses.abc_model_choice_dataset-Tuple{Vector{var&quot;#s109&quot;} where var&quot;#s109&quot;&lt;:Union{Model, ParametricModel}, Distribution{Distributions.Univariate, Distributions.Discrete}, Any, Function, Function, Int64, Int64}" href="#MarkovProcesses.abc_model_choice_dataset-Tuple{Vector{var&quot;#s109&quot;} where var&quot;#s109&quot;&lt;:Union{Model, ParametricModel}, Distribution{Distributions.Univariate, Distributions.Discrete}, Any, Function, Function, Int64, Int64}"><code>MarkovProcesses.abc_model_choice_dataset</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">abc_model_choice_dataset(models, models_prior,
+                         k::Int, N_ref::Int; dir_results::Union{Nothing,String} = nothing)</code></pre><p>Creates a reference table for ABC model choice with discrete uniform prior distribution over the models.</p></div></section></article><article class="docstring"><header><a class="docstring-binding" id="MarkovProcesses.abc_model_choice_dataset-Tuple{Vector{&lt;:Union{Model, ParametricModel}}, Distribution{Distributions.Univariate, Distributions.Discrete}, Any, Function, Function, Int64, Int64}" href="#MarkovProcesses.abc_model_choice_dataset-Tuple{Vector{&lt;:Union{Model, ParametricModel}}, Distribution{Distributions.Univariate, Distributions.Discrete}, Any, Function, Function, Int64, Int64}"><code>MarkovProcesses.abc_model_choice_dataset</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">abc_model_choice_dataset(models, models_prior,
                          summary_stats_observations,
                          summary_stats_func::Function, distance_func::Function,
-                         k::Int, N_ref::Int; dir_results::Union{Nothing,String} = nothing)</code></pre><p>Creates a reference table for ABC model choice.</p><p>The mandatory arguments are:</p><ul><li><code>models</code> is a list of objects inherited from <code>Model</code> or <code>ParametricModel</code>,</li><li><code>models_prior</code>: the prior over the models (by default: discrete uniform distribution)</li><li><code>summary_stats_observations</code> are the summary statitics of the observations,</li><li><code>summary_stats_func::Function</code>: the function that computes the summary statistics over a model simulation,</li><li><code>distance_func</code>: the distance function over the summary statistics space,</li><li><code>N_ref</code>: the number of samples in the reference table,</li><li><code>k</code>: the k nearest samples from the observations to keep in the reference table (k &lt; N_ref).</li></ul><p>The result is a <code>AbcModelChoiceDataset</code> with fields:</p><ul><li><code>summary_stats_matrix</code>: the (N<em>stats, N</em>ref) features matrix. Accessible via <code>.X</code>.</li><li><code>models_indexes</code>: the labels vector. Accessible via <code>.y</code>.</li></ul><p>If specified, <code>dir_results</code> is the directory where the summary statistics matrix and associated models are stored (CSV).</p></div></section></article><article class="docstring"><header><a class="docstring-binding" id="MarkovProcesses.posterior_proba_model-Tuple{MarkovProcesses.RandomForestABC}" href="#MarkovProcesses.posterior_proba_model-Tuple{MarkovProcesses.RandomForestABC}"><code>MarkovProcesses.posterior_proba_model</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">posterior_proba_model(rf_abc::RandomForestABC)</code></pre><p>Estimates the posterior probability of the model <span>$P(M = \widehat{M}(s_{obs}) | s_{obs})$</span> with the Random Forest ABC method.</p></div></section></article><article class="docstring"><header><a class="docstring-binding" id="MarkovProcesses.rf_abc_model_choice-Tuple{Vector{var&quot;#s109&quot;} where var&quot;#s109&quot;&lt;:Union{Model, ParametricModel}, Any, Function, Int64}" href="#MarkovProcesses.rf_abc_model_choice-Tuple{Vector{var&quot;#s109&quot;} where var&quot;#s109&quot;&lt;:Union{Model, ParametricModel}, Any, Function, Int64}"><code>MarkovProcesses.rf_abc_model_choice</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">rf_abc_model_choice(models, summary_stats_observations,
+                         k::Int, N_ref::Int; dir_results::Union{Nothing,String} = nothing)</code></pre><p>Creates a reference table for ABC model choice.</p><p>The mandatory arguments are:</p><ul><li><code>models</code> is a list of objects inherited from <code>Model</code> or <code>ParametricModel</code>,</li><li><code>models_prior</code>: the prior over the models (by default: discrete uniform distribution)</li><li><code>summary_stats_observations</code> are the summary statitics of the observations,</li><li><code>summary_stats_func::Function</code>: the function that computes the summary statistics over a model simulation,</li><li><code>distance_func</code>: the distance function over the summary statistics space,</li><li><code>N_ref</code>: the number of samples in the reference table,</li><li><code>k</code>: the k nearest samples from the observations to keep in the reference table (k &lt; N_ref).</li></ul><p>The result is a <code>AbcModelChoiceDataset</code> with fields:</p><ul><li><code>summary_stats_matrix</code>: the (N<em>stats, N</em>ref) features matrix. Accessible via <code>.X</code>.</li><li><code>models_indexes</code>: the labels vector. Accessible via <code>.y</code>.</li></ul><p>If specified, <code>dir_results</code> is the directory where the summary statistics matrix and associated models are stored (CSV).</p></div></section></article><article class="docstring"><header><a class="docstring-binding" id="MarkovProcesses.posterior_proba_model-Tuple{MarkovProcesses.RandomForestABC}" href="#MarkovProcesses.posterior_proba_model-Tuple{MarkovProcesses.RandomForestABC}"><code>MarkovProcesses.posterior_proba_model</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">posterior_proba_model(rf_abc::RandomForestABC)</code></pre><p>Estimates the posterior probability of the model <span>$P(M = \widehat{M}(s_{obs}) | s_{obs})$</span> with the Random Forest ABC method.</p></div></section></article><article class="docstring"><header><a class="docstring-binding" id="MarkovProcesses.rf_abc_model_choice-Tuple{Vector{&lt;:Union{Model, ParametricModel}}, Any, Function, Int64}" href="#MarkovProcesses.rf_abc_model_choice-Tuple{Vector{&lt;:Union{Model, ParametricModel}}, Any, Function, Int64}"><code>MarkovProcesses.rf_abc_model_choice</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">rf_abc_model_choice(models, summary_stats_observations,
                     summary_stats_func::Function, N_ref::Int;
                     k::Int = N_ref, distance_func::Function = (x,y) -&gt; 1, 
-                    hyperparameters_range::Dict)</code></pre><p>Run the Random Forest Approximate Bayesian Computation model choice method.</p><p>The mandatory arguments are:</p><ul><li><code>models</code> is a list of objects inherited from <code>Model</code> or <code>ParametricModel</code>,</li><li><code>summary_stats_observations</code> are the summary statitics of the observations</li><li><code>N_ref</code>: the number of samples in the reference table.</li><li><code>summary_stats_func::Function</code>: the function that computes the summary statistics over a model simulation.</li></ul><p>The optional arguments are:</p><ul><li><code>models_prior</code>: the prior over the models (by default: discrete uniform distribution)</li><li><code>k</code>: the k nearest samples from the observations to keep in the reference table (by default: k = N_ref)</li><li><code>distance_func</code>: the distance function, has to be defined if k &lt; N_ref</li><li><code>hyperparameters_range</code>: a dict with the hyperparameters range values for the cross validation   fit of the Random Forest (by default: <code>Dict(:n_estimators =&gt; [200], :min_samples_leaf =&gt; [1], :min_samples_split =&gt; [2])</code>).   See scikit-learn documentation of RandomForestClassifier for the hyperparameters name.</li></ul><p>The result is a <code>RandomForestABC</code> object with fields:</p><ul><li><code>reference_table</code> an AbcModelChoiceDataset that corresponds to the reference table of the algorithm, </li><li><code>clf</code> a random forest classifier (PyObject from scikit-learn),</li><li><code>summary_stats_observations</code> are the summary statitics of the observations</li><li><code>estim_model</code> is the underlying model of the observations inferred with the RF-ABC method.</li></ul></div></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="trajectory.html">« Trajectory</a><a class="docs-footer-nextpage" href="plots.html">Plots »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.17 on <span class="colophon-date" title="Tuesday 17 May 2022 07:23">Tuesday 17 May 2022</span>. Using Julia version 1.6.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
+                    hyperparameters_range::Dict)</code></pre><p>Run the Random Forest Approximate Bayesian Computation model choice method.</p><p>The mandatory arguments are:</p><ul><li><code>models</code> is a list of objects inherited from <code>Model</code> or <code>ParametricModel</code>,</li><li><code>summary_stats_observations</code> are the summary statitics of the observations</li><li><code>N_ref</code>: the number of samples in the reference table.</li><li><code>summary_stats_func::Function</code>: the function that computes the summary statistics over a model simulation.</li></ul><p>The optional arguments are:</p><ul><li><code>models_prior</code>: the prior over the models (by default: discrete uniform distribution)</li><li><code>k</code>: the k nearest samples from the observations to keep in the reference table (by default: k = N_ref)</li><li><code>distance_func</code>: the distance function, has to be defined if k &lt; N_ref</li><li><code>hyperparameters_range</code>: a dict with the hyperparameters range values for the cross validation   fit of the Random Forest (by default: <code>Dict(:n_estimators =&gt; [200], :min_samples_leaf =&gt; [1], :min_samples_split =&gt; [2])</code>).   See scikit-learn documentation of RandomForestClassifier for the hyperparameters name.</li></ul><p>The result is a <code>RandomForestABC</code> object with fields:</p><ul><li><code>reference_table</code> an AbcModelChoiceDataset that corresponds to the reference table of the algorithm, </li><li><code>clf</code> a random forest classifier (PyObject from scikit-learn),</li><li><code>summary_stats_observations</code> are the summary statitics of the observations</li><li><code>estim_model</code> is the underlying model of the observations inferred with the RF-ABC method.</li></ul></div></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="trajectory.html">« Trajectory</a><a class="docs-footer-nextpage" href="plots.html">Plots »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.24 on <span class="colophon-date" title="Wednesday 8 March 2023 15:42">Wednesday 8 March 2023</span>. Using Julia version 1.7.2.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
diff --git a/dev/api/model.html b/dev/api/model.html
index ab7827e..7f4b595 100644
--- a/dev/api/model.html
+++ b/dev/api/model.html
@@ -1,2 +1,2 @@
 <!DOCTYPE html>
-<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Model · MarkovProcesses.jl</title><script data-outdated-warner src="../assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.044/juliamono.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.11/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../index.html"><img src="../assets/logo.png" alt="MarkovProcesses.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit"><a href="../index.html">MarkovProcesses.jl</a></span></div><form class="docs-search" action="../search.html"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../index.html">Home</a></li><li><a class="tocitem" href="../starting.html">Getting Started</a></li><li><a class="tocitem" href="../create_model.html">Create a model</a></li><li><span class="tocitem">API</span><ul><li class="is-active"><a class="tocitem" href="model.html">Model</a></li><li><a class="tocitem" href="trajectory.html">Trajectory</a></li><li><a class="tocitem" href="abc.html">Approximate Bayesian Computation</a></li><li><a class="tocitem" href="plots.html">Plots</a></li></ul></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li><a class="is-disabled">API</a></li><li class="is-active"><a href="model.html">Model</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href="model.html">Model</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com//blob/master/docs/src/api/model.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Model-test-related-methods"><a class="docs-heading-anchor" href="#Model-test-related-methods">Model test related methods</a><a id="Model-test-related-methods-1"></a><a class="docs-heading-anchor-permalink" href="#Model-test-related-methods" title="Permalink"></a></h1><article class="docstring"><header><a class="docstring-binding" id="MarkovProcesses.change_simulation_stop_criteria-Tuple{ContinuousTimeModel, Symbol}" href="#MarkovProcesses.change_simulation_stop_criteria-Tuple{ContinuousTimeModel, Symbol}"><code>MarkovProcesses.change_simulation_stop_criteria</code></a> — <span class="docstring-category">Method</span></header><section><div><p><code>change_simulation_stop_criteria(m::ContinuousTimeModel, isabsorbing_func::Symbol)</code></p><p>Change the simulation of the model <code>m</code> by adding a stop criteria based on the function named <code>isabsorbing_func::Symbol</code>. <code>isabsorbing_func</code> must have the type signature <code>isabsorbing_func(p::Vector{Float64}, x::Vector{Int})</code> where <code>p</code> is the parameter vector of the model and <code>x</code> a state (not an observed state) of the model.</p></div></section></article><article class="docstring"><header><a class="docstring-binding" id="MarkovProcesses.distribute_mean_value_lha-Tuple{SynchronizedModel, Symbol, Int64}" href="#MarkovProcesses.distribute_mean_value_lha-Tuple{SynchronizedModel, Symbol, Int64}"><code>MarkovProcesses.distribute_mean_value_lha</code></a> — <span class="docstring-category">Method</span></header><section><div><p><code>distribute_mean_value_lha(sm::SynchronizedModel, sym_var::Symbol, nbr_stim::Int)</code></p><p>Distribute over workers the computation of the mean value  of an LHA over <code>nbr_sim</code> simulations of the model.</p></div></section></article><article class="docstring"><header><a class="docstring-binding" id="MarkovProcesses.draw!-Tuple{AbstractMatrix{Float64}, ParametricModel}" href="#MarkovProcesses.draw!-Tuple{AbstractMatrix{Float64}, ParametricModel}"><code>MarkovProcesses.draw!</code></a> — <span class="docstring-category">Method</span></header><section><div><p><code>draw!(mat_p, pm)</code></p><p>Draw <code>size(mat_p)[2]</code> (number of columns of <code>mat_p</code>) parameters from the prior distribution  defined in <code>pm</code> and stores it in <code>mat_p</code>.</p></div></section></article><article class="docstring"><header><a class="docstring-binding" id="MarkovProcesses.draw!-Tuple{AbstractVector{Float64}, ParametricModel}" href="#MarkovProcesses.draw!-Tuple{AbstractVector{Float64}, ParametricModel}"><code>MarkovProcesses.draw!</code></a> — <span class="docstring-category">Method</span></header><section><div><p><code>draw!(vec_p, pm)</code></p><p>Draw a parameter from the prior distribution defined in pm and stores it in <code>vec_p</code>.</p></div></section></article><article class="docstring"><header><a class="docstring-binding" id="MarkovProcesses.draw_model!-Tuple{ParametricModel}" href="#MarkovProcesses.draw_model!-Tuple{ParametricModel}"><code>MarkovProcesses.draw_model!</code></a> — <span class="docstring-category">Method</span></header><section><div><p><code>draw_model!(pm::ParametricModel)</code></p><p>Draw a parameter from the prior disitribution defined in <code>pm::ParametricModel</code> and save it in the model contained in <code>pm</code>.</p></div></section></article><article class="docstring"><header><a class="docstring-binding" id="MarkovProcesses.prior_pdf!-Tuple{AbstractVector{Float64}, ParametricModel, AbstractMatrix{Float64}}" href="#MarkovProcesses.prior_pdf!-Tuple{AbstractVector{Float64}, ParametricModel, AbstractMatrix{Float64}}"><code>MarkovProcesses.prior_pdf!</code></a> — <span class="docstring-category">Method</span></header><section><div><p><code>prior_pdf(res_pdf, mat_p, pm)</code></p><p>Computes the density for each column of <code>mat_p</code> of the prior distribution defined in <code>pm</code>. Stores it in <code>res_pdf</code>. (<code>length(vec_res) == size(mat_p)[2]</code>)</p></div></section></article><article class="docstring"><header><a class="docstring-binding" id="MarkovProcesses.prior_pdf-Tuple{ParametricModel, AbstractVector{Float64}}" href="#MarkovProcesses.prior_pdf-Tuple{ParametricModel, AbstractVector{Float64}}"><code>MarkovProcesses.prior_pdf</code></a> — <span class="docstring-category">Method</span></header><section><div><p><code>prior_pdf(p_prior, pm)</code></p><p>Computes the density at <code>p_prior</code> of the prior distribution defined in <code>pm</code>.</p></div></section></article><article class="docstring"><header><a class="docstring-binding" id="MarkovProcesses.probability_var_value_lha-Tuple{SynchronizedModel, Int64}" href="#MarkovProcesses.probability_var_value_lha-Tuple{SynchronizedModel, Int64}"><code>MarkovProcesses.probability_var_value_lha</code></a> — <span class="docstring-category">Method</span></header><section><div><p><code>distribute_var_value_lha(sm::SynchronizedModel, nbr_sim::Int, value = 0, sym_var = :d)</code></p><p>Compute the probability that the variable <code>sym_var</code> is equal to <code>value</code> of an LHA over <code>nbr_sim</code> simulations of the model.</p></div></section></article><article class="docstring"><header><a class="docstring-binding" id="MarkovProcesses.simulate-Tuple{ParametricModel, AbstractVector{Float64}}" href="#MarkovProcesses.simulate-Tuple{ParametricModel, AbstractVector{Float64}}"><code>MarkovProcesses.simulate</code></a> — <span class="docstring-category">Method</span></header><section><div><p><code>simulate(pm::ParametricModel, p_prior::AbstractVector{Float64})</code></p><p>Simulates the model contained in the parametric model <code>pm</code> with the <code>p_prior</code> parameters. It simulates the model by taking the parameters contained in <code>get_proba_model(pm).p</code> and replace the 1D parameters pm.params with <code>p_prior</code>.</p></div></section></article><article class="docstring"><header><a class="docstring-binding" id="MarkovProcesses.volatile_simulate-Tuple{ParametricModel, AbstractVector{Float64}}" href="#MarkovProcesses.volatile_simulate-Tuple{ParametricModel, AbstractVector{Float64}}"><code>MarkovProcesses.volatile_simulate</code></a> — <span class="docstring-category">Method</span></header><section><div><p><code>volatile_simulate(pm::ParametricModel, p_prior::AbstractVector{Float64})</code></p><p>A volatile version of <code>simulate(pm::ParametricModel, p_prior::AbstractVector{Float64})</code>. The model in <code>pm</code> should be of type SynchronizedModel (<code>typeof(pm.m) &lt;: SynchronizedModel</code>). It returns <code>S::StateLHA</code>, not a trajectory.</p></div></section></article><article class="docstring"><header><a class="docstring-binding" id="MarkovProcesses.volatile_simulate-Tuple{SynchronizedModel}" href="#MarkovProcesses.volatile_simulate-Tuple{SynchronizedModel}"><code>MarkovProcesses.volatile_simulate</code></a> — <span class="docstring-category">Method</span></header><section><div><p><code>volatile_simulate(sm::SynchronizedModel; p, verbose)</code></p><p>Simulates a model synchronized with an automaton but does not store the values of the simulation  in order to improve performance. It returns the last state of the simulation <code>S::StateLHA</code> not a trajectory <code>σ::SynchronizedTrajectory</code>.</p></div></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../create_model.html">« Create a model</a><a class="docs-footer-nextpage" href="trajectory.html">Trajectory »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.17 on <span class="colophon-date" title="Tuesday 17 May 2022 07:23">Tuesday 17 May 2022</span>. Using Julia version 1.6.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
+<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Model · MarkovProcesses.jl</title><script data-outdated-warner src="../assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.045/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.24/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../index.html"><img src="../assets/logo.png" alt="MarkovProcesses.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit"><a href="../index.html">MarkovProcesses.jl</a></span></div><form class="docs-search" action="../search.html"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../index.html">Home</a></li><li><a class="tocitem" href="../starting.html">Getting Started</a></li><li><a class="tocitem" href="../create_model.html">Create a model</a></li><li><span class="tocitem">API</span><ul><li class="is-active"><a class="tocitem" href="model.html">Model</a></li><li><a class="tocitem" href="trajectory.html">Trajectory</a></li><li><a class="tocitem" href="abc.html">Approximate Bayesian Computation</a></li><li><a class="tocitem" href="plots.html">Plots</a></li></ul></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li><a class="is-disabled">API</a></li><li class="is-active"><a href="model.html">Model</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href="model.html">Model</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com//blob/master/docs/src/api/model.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Model-test-related-methods"><a class="docs-heading-anchor" href="#Model-test-related-methods">Model test related methods</a><a id="Model-test-related-methods-1"></a><a class="docs-heading-anchor-permalink" href="#Model-test-related-methods" title="Permalink"></a></h1><article class="docstring"><header><a class="docstring-binding" id="MarkovProcesses.change_simulation_stop_criteria-Tuple{ContinuousTimeModel, Symbol}" href="#MarkovProcesses.change_simulation_stop_criteria-Tuple{ContinuousTimeModel, Symbol}"><code>MarkovProcesses.change_simulation_stop_criteria</code></a> — <span class="docstring-category">Method</span></header><section><div><p><code>change_simulation_stop_criteria(m::ContinuousTimeModel, isabsorbing_func::Symbol)</code></p><p>Change the simulation of the model <code>m</code> by adding a stop criteria based on the function named <code>isabsorbing_func::Symbol</code>. <code>isabsorbing_func</code> must have the type signature <code>isabsorbing_func(p::Vector{Float64}, x::Vector{Int})</code> where <code>p</code> is the parameter vector of the model and <code>x</code> a state (not an observed state) of the model.</p></div></section></article><article class="docstring"><header><a class="docstring-binding" id="MarkovProcesses.distribute_mean_value_lha-Tuple{SynchronizedModel, Symbol, Int64}" href="#MarkovProcesses.distribute_mean_value_lha-Tuple{SynchronizedModel, Symbol, Int64}"><code>MarkovProcesses.distribute_mean_value_lha</code></a> — <span class="docstring-category">Method</span></header><section><div><p><code>distribute_mean_value_lha(sm::SynchronizedModel, sym_var::Symbol, nbr_stim::Int)</code></p><p>Distribute over workers the computation of the mean value  of an LHA over <code>nbr_sim</code> simulations of the model.</p></div></section></article><article class="docstring"><header><a class="docstring-binding" id="MarkovProcesses.draw!-Tuple{AbstractMatrix{Float64}, ParametricModel}" href="#MarkovProcesses.draw!-Tuple{AbstractMatrix{Float64}, ParametricModel}"><code>MarkovProcesses.draw!</code></a> — <span class="docstring-category">Method</span></header><section><div><p><code>draw!(mat_p, pm)</code></p><p>Draw <code>size(mat_p)[2]</code> (number of columns of <code>mat_p</code>) parameters from the prior distribution  defined in <code>pm</code> and stores it in <code>mat_p</code>.</p></div></section></article><article class="docstring"><header><a class="docstring-binding" id="MarkovProcesses.draw!-Tuple{AbstractVector{Float64}, ParametricModel}" href="#MarkovProcesses.draw!-Tuple{AbstractVector{Float64}, ParametricModel}"><code>MarkovProcesses.draw!</code></a> — <span class="docstring-category">Method</span></header><section><div><p><code>draw!(vec_p, pm)</code></p><p>Draw a parameter from the prior distribution defined in pm and stores it in <code>vec_p</code>.</p></div></section></article><article class="docstring"><header><a class="docstring-binding" id="MarkovProcesses.draw_model!-Tuple{ParametricModel}" href="#MarkovProcesses.draw_model!-Tuple{ParametricModel}"><code>MarkovProcesses.draw_model!</code></a> — <span class="docstring-category">Method</span></header><section><div><p><code>draw_model!(pm::ParametricModel)</code></p><p>Draw a parameter from the prior disitribution defined in <code>pm::ParametricModel</code> and save it in the model contained in <code>pm</code>.</p></div></section></article><article class="docstring"><header><a class="docstring-binding" id="MarkovProcesses.prior_pdf!-Tuple{AbstractVector{Float64}, ParametricModel, AbstractMatrix{Float64}}" href="#MarkovProcesses.prior_pdf!-Tuple{AbstractVector{Float64}, ParametricModel, AbstractMatrix{Float64}}"><code>MarkovProcesses.prior_pdf!</code></a> — <span class="docstring-category">Method</span></header><section><div><p><code>prior_pdf(res_pdf, mat_p, pm)</code></p><p>Computes the density for each column of <code>mat_p</code> of the prior distribution defined in <code>pm</code>. Stores it in <code>res_pdf</code>. (<code>length(vec_res) == size(mat_p)[2]</code>)</p></div></section></article><article class="docstring"><header><a class="docstring-binding" id="MarkovProcesses.prior_pdf-Tuple{ParametricModel, AbstractVector{Float64}}" href="#MarkovProcesses.prior_pdf-Tuple{ParametricModel, AbstractVector{Float64}}"><code>MarkovProcesses.prior_pdf</code></a> — <span class="docstring-category">Method</span></header><section><div><p><code>prior_pdf(p_prior, pm)</code></p><p>Computes the density at <code>p_prior</code> of the prior distribution defined in <code>pm</code>.</p></div></section></article><article class="docstring"><header><a class="docstring-binding" id="MarkovProcesses.probability_var_value_lha-Tuple{SynchronizedModel, Int64}" href="#MarkovProcesses.probability_var_value_lha-Tuple{SynchronizedModel, Int64}"><code>MarkovProcesses.probability_var_value_lha</code></a> — <span class="docstring-category">Method</span></header><section><div><p><code>distribute_var_value_lha(sm::SynchronizedModel, nbr_sim::Int, value = 0, sym_var = :d)</code></p><p>Compute the probability that the variable <code>sym_var</code> is equal to <code>value</code> of an LHA over <code>nbr_sim</code> simulations of the model.</p></div></section></article><article class="docstring"><header><a class="docstring-binding" id="MarkovProcesses.simulate-Tuple{ParametricModel, AbstractVector{Float64}}" href="#MarkovProcesses.simulate-Tuple{ParametricModel, AbstractVector{Float64}}"><code>MarkovProcesses.simulate</code></a> — <span class="docstring-category">Method</span></header><section><div><p><code>simulate(pm::ParametricModel, p_prior::AbstractVector{Float64})</code></p><p>Simulates the model contained in the parametric model <code>pm</code> with the <code>p_prior</code> parameters. It simulates the model by taking the parameters contained in <code>get_proba_model(pm).p</code> and replace the 1D parameters pm.params with <code>p_prior</code>.</p></div></section></article><article class="docstring"><header><a class="docstring-binding" id="MarkovProcesses.volatile_simulate-Tuple{ParametricModel, AbstractVector{Float64}}" href="#MarkovProcesses.volatile_simulate-Tuple{ParametricModel, AbstractVector{Float64}}"><code>MarkovProcesses.volatile_simulate</code></a> — <span class="docstring-category">Method</span></header><section><div><p><code>volatile_simulate(pm::ParametricModel, p_prior::AbstractVector{Float64})</code></p><p>A volatile version of <code>simulate(pm::ParametricModel, p_prior::AbstractVector{Float64})</code>. The model in <code>pm</code> should be of type SynchronizedModel (<code>typeof(pm.m) &lt;: SynchronizedModel</code>). It returns <code>S::StateLHA</code>, not a trajectory.</p></div></section></article><article class="docstring"><header><a class="docstring-binding" id="MarkovProcesses.volatile_simulate-Tuple{SynchronizedModel}" href="#MarkovProcesses.volatile_simulate-Tuple{SynchronizedModel}"><code>MarkovProcesses.volatile_simulate</code></a> — <span class="docstring-category">Method</span></header><section><div><p><code>volatile_simulate(sm::SynchronizedModel; p, verbose)</code></p><p>Simulates a model synchronized with an automaton but does not store the values of the simulation  in order to improve performance. It returns the last state of the simulation <code>S::StateLHA</code> not a trajectory <code>σ::SynchronizedTrajectory</code>.</p></div></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../create_model.html">« Create a model</a><a class="docs-footer-nextpage" href="trajectory.html">Trajectory »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.24 on <span class="colophon-date" title="Wednesday 8 March 2023 15:42">Wednesday 8 March 2023</span>. Using Julia version 1.7.2.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
diff --git a/dev/api/plots.html b/dev/api/plots.html
index ef8d1c3..ec77126 100644
--- a/dev/api/plots.html
+++ b/dev/api/plots.html
@@ -1,2 +1,2 @@
 <!DOCTYPE html>
-<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Plots · MarkovProcesses.jl</title><script data-outdated-warner src="../assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.044/juliamono.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.11/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../index.html"><img src="../assets/logo.png" alt="MarkovProcesses.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit"><a href="../index.html">MarkovProcesses.jl</a></span></div><form class="docs-search" action="../search.html"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../index.html">Home</a></li><li><a class="tocitem" href="../starting.html">Getting Started</a></li><li><a class="tocitem" href="../create_model.html">Create a model</a></li><li><span class="tocitem">API</span><ul><li><a class="tocitem" href="model.html">Model</a></li><li><a class="tocitem" href="trajectory.html">Trajectory</a></li><li><a class="tocitem" href="abc.html">Approximate Bayesian Computation</a></li><li class="is-active"><a class="tocitem" href="plots.html">Plots</a></li></ul></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li><a class="is-disabled">API</a></li><li class="is-active"><a href="plots.html">Plots</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href="plots.html">Plots</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com//blob/master/docs/src/api/plots.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Plots-related-methods"><a class="docs-heading-anchor" href="#Plots-related-methods">Plots related methods</a><a id="Plots-related-methods-1"></a><a class="docs-heading-anchor-permalink" href="#Plots-related-methods" title="Permalink"></a></h1></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="abc.html">« Approximate Bayesian Computation</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.17 on <span class="colophon-date" title="Tuesday 17 May 2022 07:23">Tuesday 17 May 2022</span>. Using Julia version 1.6.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
+<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Plots · MarkovProcesses.jl</title><script data-outdated-warner src="../assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.045/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.24/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../index.html"><img src="../assets/logo.png" alt="MarkovProcesses.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit"><a href="../index.html">MarkovProcesses.jl</a></span></div><form class="docs-search" action="../search.html"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../index.html">Home</a></li><li><a class="tocitem" href="../starting.html">Getting Started</a></li><li><a class="tocitem" href="../create_model.html">Create a model</a></li><li><span class="tocitem">API</span><ul><li><a class="tocitem" href="model.html">Model</a></li><li><a class="tocitem" href="trajectory.html">Trajectory</a></li><li><a class="tocitem" href="abc.html">Approximate Bayesian Computation</a></li><li class="is-active"><a class="tocitem" href="plots.html">Plots</a></li></ul></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li><a class="is-disabled">API</a></li><li class="is-active"><a href="plots.html">Plots</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href="plots.html">Plots</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com//blob/master/docs/src/api/plots.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Plots-related-methods"><a class="docs-heading-anchor" href="#Plots-related-methods">Plots related methods</a><a id="Plots-related-methods-1"></a><a class="docs-heading-anchor-permalink" href="#Plots-related-methods" title="Permalink"></a></h1></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="abc.html">« Approximate Bayesian Computation</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.24 on <span class="colophon-date" title="Wednesday 8 March 2023 15:42">Wednesday 8 March 2023</span>. Using Julia version 1.7.2.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
diff --git a/dev/api/trajectory.html b/dev/api/trajectory.html
index 2eeb231..a449dd5 100644
--- a/dev/api/trajectory.html
+++ b/dev/api/trajectory.html
@@ -1,2 +1,2 @@
 <!DOCTYPE html>
-<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Trajectory · MarkovProcesses.jl</title><script data-outdated-warner src="../assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.044/juliamono.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.11/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../index.html"><img src="../assets/logo.png" alt="MarkovProcesses.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit"><a href="../index.html">MarkovProcesses.jl</a></span></div><form class="docs-search" action="../search.html"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../index.html">Home</a></li><li><a class="tocitem" href="../starting.html">Getting Started</a></li><li><a class="tocitem" href="../create_model.html">Create a model</a></li><li><span class="tocitem">API</span><ul><li><a class="tocitem" href="model.html">Model</a></li><li class="is-active"><a class="tocitem" href="trajectory.html">Trajectory</a></li><li><a class="tocitem" href="abc.html">Approximate Bayesian Computation</a></li><li><a class="tocitem" href="plots.html">Plots</a></li></ul></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li><a class="is-disabled">API</a></li><li class="is-active"><a href="trajectory.html">Trajectory</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href="trajectory.html">Trajectory</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com//blob/master/docs/src/api/trajectory.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Trajectory-related-methods"><a class="docs-heading-anchor" href="#Trajectory-related-methods">Trajectory related methods</a><a id="Trajectory-related-methods-1"></a><a class="docs-heading-anchor-permalink" href="#Trajectory-related-methods" title="Permalink"></a></h1><article class="docstring"><header><a class="docstring-binding" id="MarkovProcesses.dist_lp-Tuple{AbstractTrajectory, AbstractTrajectory, Symbol}" href="#MarkovProcesses.dist_lp-Tuple{AbstractTrajectory, AbstractTrajectory, Symbol}"><code>MarkovProcesses.dist_lp</code></a> — <span class="docstring-category">Method</span></header><section><div><p><code>dist_lp(σ1, σ2, var; verbose, p, str_stat)</code>   </p><p>Function that computes Lp distance between two trajectories of any dimension. It computes Lp distances for each observed variable (contained in <code>get_obs_var(σ)</code>). and then apply a statistic on these distances. Requires <code>get_obs_var(σ1) == get_obs_var(σ2)</code>, it is verified if they are simulated from the same model. ...</p><p><strong>Arguments</strong></p><ul><li><code>σ1::AbstractTrajectory</code> is the first trajectory. σ2 is the second.</li><li><code>var::Symbol</code> is an observed variable. Have to be contained in <code>get_obs_var(σ1)</code> and <code>get_obs_var(σ2)</code>.</li><li><code>verbose::Bool</code> If <code>true</code>, launch a verbose execution of the computation. </li></ul><p>...</p></div></section></article><article class="docstring"><header><a class="docstring-binding" id="MarkovProcesses.dist_lp-Tuple{AbstractTrajectory, AbstractTrajectory}" href="#MarkovProcesses.dist_lp-Tuple{AbstractTrajectory, AbstractTrajectory}"><code>MarkovProcesses.dist_lp</code></a> — <span class="docstring-category">Method</span></header><section><div><p><code>dist_lp(σ1, σ2; verbose, p, str_stat)</code>   </p><p>Function that computes Lp distance between two trajectories of any dimension. It computes Lp distances for each observed variable (contained in <code>get_obs_var(σ)</code>). and then apply a statistic on these distances. Requires <code>get_obs_var(σ1) == get_obs_var(σ2)</code>, it is verified if they are simulated from the same model. ...</p><p><strong>Arguments</strong></p><ul><li><code>σ1::AbstractTrajectory</code> is the first trajectory. σ2 is the second.</li><li><code>verbose::Bool</code> If <code>true</code>, launch a verbose execution of the computation. </li><li><code>str_stat::String</code> allows to set the statistic to apply on the distances computed  of the trajectories. </li></ul><p>Only &quot;mean&quot; is available for now on. ...</p></div></section></article><article class="docstring"><header><a class="docstring-binding" id="MarkovProcesses.dist_lp-Tuple{Vector{var&quot;#s18&quot;} where var&quot;#s18&quot;&lt;:AbstractTrajectory, Vector{var&quot;#s19&quot;} where var&quot;#s19&quot;&lt;:AbstractTrajectory}" href="#MarkovProcesses.dist_lp-Tuple{Vector{var&quot;#s18&quot;} where var&quot;#s18&quot;&lt;:AbstractTrajectory, Vector{var&quot;#s19&quot;} where var&quot;#s19&quot;&lt;:AbstractTrajectory}"><code>MarkovProcesses.dist_lp</code></a> — <span class="docstring-category">Method</span></header><section><div><p><code>dist_lp(l_σ1, l_σ2; verbose, p, str_stat_list, str_stat_trajectory)</code> </p><p>Function that computes Lp distance between two set of any dimensional trajectories. ...</p><p><strong>Arguments</strong></p><ul><li><code>l_σ1::Vector{AbstractTrajectory}</code> is the first set of trajectories. l_σ2 is the second.</li><li><code>verbose::Bool</code> If <code>true</code>, launch a verbose execution of the computation. </li><li><code>str_stat_list::String</code> allows to set the statistic to apply on the distances of the trajectories. </li></ul><p>It is salso called linkage function in clustering field. Only &quot;mean&quot; is available for now on. ...</p></div></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="model.html">« Model</a><a class="docs-footer-nextpage" href="abc.html">Approximate Bayesian Computation »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.17 on <span class="colophon-date" title="Tuesday 17 May 2022 07:23">Tuesday 17 May 2022</span>. Using Julia version 1.6.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
+<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Trajectory · MarkovProcesses.jl</title><script data-outdated-warner src="../assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.045/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.24/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../index.html"><img src="../assets/logo.png" alt="MarkovProcesses.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit"><a href="../index.html">MarkovProcesses.jl</a></span></div><form class="docs-search" action="../search.html"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../index.html">Home</a></li><li><a class="tocitem" href="../starting.html">Getting Started</a></li><li><a class="tocitem" href="../create_model.html">Create a model</a></li><li><span class="tocitem">API</span><ul><li><a class="tocitem" href="model.html">Model</a></li><li class="is-active"><a class="tocitem" href="trajectory.html">Trajectory</a></li><li><a class="tocitem" href="abc.html">Approximate Bayesian Computation</a></li><li><a class="tocitem" href="plots.html">Plots</a></li></ul></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li><a class="is-disabled">API</a></li><li class="is-active"><a href="trajectory.html">Trajectory</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href="trajectory.html">Trajectory</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com//blob/master/docs/src/api/trajectory.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Trajectory-related-methods"><a class="docs-heading-anchor" href="#Trajectory-related-methods">Trajectory related methods</a><a id="Trajectory-related-methods-1"></a><a class="docs-heading-anchor-permalink" href="#Trajectory-related-methods" title="Permalink"></a></h1><article class="docstring"><header><a class="docstring-binding" id="MarkovProcesses.dist_lp-Tuple{AbstractTrajectory, AbstractTrajectory, Symbol}" href="#MarkovProcesses.dist_lp-Tuple{AbstractTrajectory, AbstractTrajectory, Symbol}"><code>MarkovProcesses.dist_lp</code></a> — <span class="docstring-category">Method</span></header><section><div><p><code>dist_lp(σ1, σ2, var; verbose, p, str_stat)</code>   </p><p>Function that computes Lp distance between two trajectories of any dimension. It computes Lp distances for each observed variable (contained in <code>get_obs_var(σ)</code>). and then apply a statistic on these distances. Requires <code>get_obs_var(σ1) == get_obs_var(σ2)</code>, it is verified if they are simulated from the same model. ...</p><p><strong>Arguments</strong></p><ul><li><code>σ1::AbstractTrajectory</code> is the first trajectory. σ2 is the second.</li><li><code>var::Symbol</code> is an observed variable. Have to be contained in <code>get_obs_var(σ1)</code> and <code>get_obs_var(σ2)</code>.</li><li><code>verbose::Bool</code> If <code>true</code>, launch a verbose execution of the computation. </li></ul><p>...</p></div></section></article><article class="docstring"><header><a class="docstring-binding" id="MarkovProcesses.dist_lp-Tuple{AbstractTrajectory, AbstractTrajectory}" href="#MarkovProcesses.dist_lp-Tuple{AbstractTrajectory, AbstractTrajectory}"><code>MarkovProcesses.dist_lp</code></a> — <span class="docstring-category">Method</span></header><section><div><p><code>dist_lp(σ1, σ2; verbose, p, str_stat)</code>   </p><p>Function that computes Lp distance between two trajectories of any dimension. It computes Lp distances for each observed variable (contained in <code>get_obs_var(σ)</code>). and then apply a statistic on these distances. Requires <code>get_obs_var(σ1) == get_obs_var(σ2)</code>, it is verified if they are simulated from the same model. ...</p><p><strong>Arguments</strong></p><ul><li><code>σ1::AbstractTrajectory</code> is the first trajectory. σ2 is the second.</li><li><code>verbose::Bool</code> If <code>true</code>, launch a verbose execution of the computation. </li><li><code>str_stat::String</code> allows to set the statistic to apply on the distances computed  of the trajectories. </li></ul><p>Only &quot;mean&quot; is available for now on. ...</p></div></section></article><article class="docstring"><header><a class="docstring-binding" id="MarkovProcesses.dist_lp-Tuple{Vector{&lt;:AbstractTrajectory}, Vector{&lt;:AbstractTrajectory}}" href="#MarkovProcesses.dist_lp-Tuple{Vector{&lt;:AbstractTrajectory}, Vector{&lt;:AbstractTrajectory}}"><code>MarkovProcesses.dist_lp</code></a> — <span class="docstring-category">Method</span></header><section><div><p><code>dist_lp(l_σ1, l_σ2; verbose, p, str_stat_list, str_stat_trajectory)</code> </p><p>Function that computes Lp distance between two set of any dimensional trajectories. ...</p><p><strong>Arguments</strong></p><ul><li><code>l_σ1::Vector{AbstractTrajectory}</code> is the first set of trajectories. l_σ2 is the second.</li><li><code>verbose::Bool</code> If <code>true</code>, launch a verbose execution of the computation. </li><li><code>str_stat_list::String</code> allows to set the statistic to apply on the distances of the trajectories. </li></ul><p>It is salso called linkage function in clustering field. Only &quot;mean&quot; is available for now on. ...</p></div></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="model.html">« Model</a><a class="docs-footer-nextpage" href="abc.html">Approximate Bayesian Computation »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.24 on <span class="colophon-date" title="Wednesday 8 March 2023 15:42">Wednesday 8 March 2023</span>. Using Julia version 1.7.2.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
diff --git a/dev/assets/documenter.js b/dev/assets/documenter.js
index a1ada46..6adfbbb 100644
--- a/dev/assets/documenter.js
+++ b/dev/assets/documenter.js
@@ -1,15 +1,15 @@
 // Generated by Documenter.jl
 requirejs.config({
   paths: {
-    'highlight-julia': 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.0.1/languages/julia.min',
+    'highlight-julia': 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.5.1/languages/julia.min',
     'headroom': 'https://cdnjs.cloudflare.com/ajax/libs/headroom/0.12.0/headroom.min',
     'jqueryui': 'https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min',
-    'katex-auto-render': 'https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.11/contrib/auto-render.min',
+    'katex-auto-render': 'https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.24/contrib/auto-render.min',
     'jquery': 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min',
     'headroom-jquery': 'https://cdnjs.cloudflare.com/ajax/libs/headroom/0.12.0/jQuery.headroom.min',
-    'katex': 'https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.11/katex.min',
-    'highlight': 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.0.1/highlight.min',
-    'highlight-julia-repl': 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.0.1/languages/julia-repl.min',
+    'katex': 'https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.24/katex.min',
+    'highlight': 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.5.1/highlight.min',
+    'highlight-julia-repl': 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.5.1/languages/julia-repl.min',
   },
   shim: {
   "highlight-julia": {
@@ -283,6 +283,12 @@ require(['jquery'], function($) {
 
 // update the version selector with info from the siteinfo.js and ../versions.js files
 $(document).ready(function() {
+  // If the version selector is disabled with DOCUMENTER_VERSION_SELECTOR_DISABLED in the
+  // siteinfo.js file, we just return immediately and not display the version selector.
+  if (typeof DOCUMENTER_VERSION_SELECTOR_DISABLED === 'boolean' && DOCUMENTER_VERSION_SELECTOR_DISABLED) {
+    return;
+  }
+
   var version_selector = $("#documenter .docs-version-selector");
   var version_selector_select = $("#documenter .docs-version-selector select");
 
diff --git a/dev/assets/search.js b/dev/assets/search.js
index 1a51454..c133f74 100644
--- a/dev/assets/search.js
+++ b/dev/assets/search.js
@@ -188,6 +188,8 @@ $(document).ready(function() {
     searchresults = $('#documenter-search-results');
     searchinfo = $('#documenter-search-info');
     searchbox = $('#documenter-search-query');
+    searchform = $('.docs-search');
+    sidebar = $('.docs-sidebar');
     function update_search(querystring) {
       tokens = lunr.tokenizer(querystring)
       results = index.query(function (q) {
@@ -239,6 +241,20 @@ $(document).ready(function() {
     searchbox.keyup(_.debounce(update_search_box, 250))
     searchbox.change(update_search_box)
 
+    // Disable enter-key form submission for the searchbox on the search page
+    // and just re-run search rather than refresh the whole page.
+    searchform.keypress(
+      function(event){
+        if (event.which == '13') {
+          if (sidebar.hasClass('visible')) {
+            sidebar.removeClass('visible');
+          }
+          update_search_box();
+          event.preventDefault();
+        }
+      }
+    );
+
     search_query_uri = parseUri(window.location).queryKey["q"]
     if(search_query_uri !== undefined) {
       search_query = decodeURIComponent(search_query_uri.replace(/\+/g, '%20'))
diff --git a/dev/assets/themes/documenter-dark.css b/dev/assets/themes/documenter-dark.css
index 3608141..0bf1af7 100644
--- a/dev/assets/themes/documenter-dark.css
+++ b/dev/assets/themes/documenter-dark.css
@@ -3598,7 +3598,7 @@ html.theme--documenter-dark {
     position: relative; }
   html.theme--documenter-dark .card-content {
     background-color: transparent;
-    padding: 1rem 1.25rem; }
+    padding: 1.5rem; }
   html.theme--documenter-dark .card-footer {
     background-color: transparent;
     border-top: 1px solid #5e6d6f;
@@ -3938,7 +3938,7 @@ html.theme--documenter-dark {
     font-weight: 700;
     justify-content: space-between;
     line-height: 1.25;
-    padding: 0.75em;
+    padding: 0.75em 1em;
     position: relative; }
     html.theme--documenter-dark .message-header .delete {
       flex-grow: 0;
@@ -3954,7 +3954,7 @@ html.theme--documenter-dark {
     border-style: solid;
     border-width: 0 0 0 4px;
     color: #fff;
-    padding: 1em 1.25em; }
+    padding: 1.25em 1.5em; }
     html.theme--documenter-dark .message-body code,
     html.theme--documenter-dark .message-body pre {
       background-color: white; }
@@ -7090,13 +7090,13 @@ html.theme--documenter-dark {
     position: relative;
     overflow: hidden; }
     html.theme--documenter-dark pre code, html.theme--documenter-dark pre code.hljs {
-      padding: 0 0.5rem !important;
+      padding: 0 0.75rem !important;
       overflow: auto;
       display: block; }
     html.theme--documenter-dark pre code:first-of-type, html.theme--documenter-dark pre code.hljs:first-of-type {
-      padding-top: 0.7rem !important; }
+      padding-top: 0.5rem !important; }
     html.theme--documenter-dark pre code:last-of-type, html.theme--documenter-dark pre code.hljs:last-of-type {
-      padding-bottom: 0.7rem !important; }
+      padding-bottom: 0.5rem !important; }
     html.theme--documenter-dark pre .copy-button {
       opacity: 0.2;
       transition: opacity 0.2s;
@@ -7175,16 +7175,16 @@ html.theme--documenter-dark {
     font-weight: 700;
     justify-content: space-between;
     line-height: 1.25;
-    padding: 0.75em;
+    padding: 0.5rem 0.75rem;
     position: relative; }
     html.theme--documenter-dark .admonition-header:before {
       font-family: "Font Awesome 5 Free";
       font-weight: 900;
-      margin-right: 0.75em;
+      margin-right: 0.75rem;
       content: "\f06a"; }
   html.theme--documenter-dark .admonition-body {
     color: #fff;
-    padding: 1em 1.25em; }
+    padding: 0.5rem 0.75rem; }
     html.theme--documenter-dark .admonition-body pre {
       background-color: #282f2f; }
     html.theme--documenter-dark .admonition-body code {
@@ -7199,7 +7199,7 @@ html.theme--documenter-dark {
       display: flex;
       flex-grow: 1;
       align-items: stretch;
-      padding: 0.75rem;
+      padding: 0.5rem 0.75rem;
       background-color: #282f2f;
       box-shadow: 0 1px 2px rgba(10, 10, 10, 0.1);
       box-shadow: none;
@@ -7212,7 +7212,7 @@ html.theme--documenter-dark {
         margin-left: 0.3em; }
     html.theme--documenter-dark .docstring > section {
       position: relative;
-      padding: 1rem 1.25rem;
+      padding: 0.75rem 0.75rem;
       border-bottom: 1px solid #5e6d6f; }
       html.theme--documenter-dark .docstring > section:last-child {
         border-bottom: none; }
@@ -7220,8 +7220,8 @@ html.theme--documenter-dark {
         transition: opacity 0.3s;
         opacity: 0;
         position: absolute;
-        right: 0.625rem;
-        bottom: 0.5rem; }
+        right: 0.375rem;
+        bottom: 0.375rem; }
         html.theme--documenter-dark .docstring > section > a.docs-sourcelink:focus {
           opacity: 1 !important; }
     html.theme--documenter-dark .docstring:hover > section > a.docs-sourcelink {
diff --git a/dev/assets/themes/documenter-light.css b/dev/assets/themes/documenter-light.css
index f3e70f4..9595d5b 100644
--- a/dev/assets/themes/documenter-light.css
+++ b/dev/assets/themes/documenter-light.css
@@ -3666,7 +3666,7 @@ a.tag:hover, .docstring > section > a.docs-sourcelink:hover {
 
 .card-content {
   background-color: transparent;
-  padding: 1rem 1.25rem; }
+  padding: 1.5rem; }
 
 .card-footer {
   background-color: transparent;
@@ -4029,7 +4029,7 @@ a.list-item {
   font-weight: 700;
   justify-content: space-between;
   line-height: 1.25;
-  padding: 0.75em;
+  padding: 0.75em 1em;
   position: relative; }
   .message-header .delete {
     flex-grow: 0;
@@ -4046,7 +4046,7 @@ a.list-item {
   border-style: solid;
   border-width: 0 0 0 4px;
   color: #222222;
-  padding: 1em 1.25em; }
+  padding: 1.25em 1.5em; }
   .message-body code,
   .message-body pre {
     background-color: white; }
@@ -7004,13 +7004,13 @@ pre {
   position: relative;
   overflow: hidden; }
   pre code, pre code.hljs {
-    padding: 0 0.5rem !important;
+    padding: 0 0.75rem !important;
     overflow: auto;
     display: block; }
   pre code:first-of-type, pre code.hljs:first-of-type {
-    padding-top: 0.7rem !important; }
+    padding-top: 0.5rem !important; }
   pre code:last-of-type, pre code.hljs:last-of-type {
-    padding-bottom: 0.7rem !important; }
+    padding-bottom: 0.5rem !important; }
   pre .copy-button {
     opacity: 0.2;
     transition: opacity 0.2s;
@@ -7110,17 +7110,17 @@ pre {
   font-weight: 700;
   justify-content: space-between;
   line-height: 1.25;
-  padding: 0.75em;
+  padding: 0.5rem 0.75rem;
   position: relative; }
   .admonition-header:before {
     font-family: "Font Awesome 5 Free";
     font-weight: 900;
-    margin-right: 0.75em;
+    margin-right: 0.75rem;
     content: "\f06a"; }
 
 .admonition-body {
   color: #222222;
-  padding: 1em 1.25em; }
+  padding: 0.5rem 0.75rem; }
   .admonition-body pre {
     background-color: whitesmoke; }
   .admonition-body code {
@@ -7136,7 +7136,7 @@ pre {
     display: flex;
     flex-grow: 1;
     align-items: stretch;
-    padding: 0.75rem;
+    padding: 0.5rem 0.75rem;
     background-color: whitesmoke;
     box-shadow: 0 1px 2px rgba(10, 10, 10, 0.1);
     box-shadow: none;
@@ -7149,7 +7149,7 @@ pre {
       margin-left: 0.3em; }
   .docstring > section {
     position: relative;
-    padding: 1rem 1.25rem;
+    padding: 0.75rem 0.75rem;
     border-bottom: 1px solid #dbdbdb; }
     .docstring > section:last-child {
       border-bottom: none; }
@@ -7157,8 +7157,8 @@ pre {
       transition: opacity 0.3s;
       opacity: 0;
       position: absolute;
-      right: 0.625rem;
-      bottom: 0.5rem; }
+      right: 0.375rem;
+      bottom: 0.375rem; }
       .docstring > section > a.docs-sourcelink:focus {
         opacity: 1 !important; }
   .docstring:hover > section > a.docs-sourcelink {
diff --git a/dev/create_model.html b/dev/create_model.html
index 45d89c7..c2fff1e 100644
--- a/dev/create_model.html
+++ b/dev/create_model.html
@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Create a model · MarkovProcesses.jl</title><script data-outdated-warner src="assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.044/juliamono.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.11/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="assets/documenter.js"></script><script src="siteinfo.js"></script><script src="../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="index.html"><img src="assets/logo.png" alt="MarkovProcesses.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit"><a href="index.html">MarkovProcesses.jl</a></span></div><form class="docs-search" action="search.html"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="index.html">Home</a></li><li><a class="tocitem" href="starting.html">Getting Started</a></li><li class="is-active"><a class="tocitem" href="create_model.html">Create a model</a><ul class="internal"><li><a class="tocitem" href="#Load-a-pre-written-model"><span>Load a pre-written model</span></a></li><li><a class="tocitem" href="#Define-a-Chemical-Reaction-Network"><span>Define a Chemical Reaction Network</span></a></li><li><a class="tocitem" href="#Manually-(advanced)"><span>Manually (advanced)</span></a></li><li><a class="tocitem" href="#List-of-pre-written-models"><span>List of pre-written models</span></a></li></ul></li><li><span class="tocitem">API</span><ul><li><a class="tocitem" href="api/model.html">Model</a></li><li><a class="tocitem" href="api/trajectory.html">Trajectory</a></li><li><a class="tocitem" href="api/abc.html">Approximate Bayesian Computation</a></li><li><a class="tocitem" href="api/plots.html">Plots</a></li></ul></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href="create_model.html">Create a model</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href="create_model.html">Create a model</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com//blob/master/docs/src/create_model.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Create-a-model"><a class="docs-heading-anchor" href="#Create-a-model">Create a model</a><a id="Create-a-model-1"></a><a class="docs-heading-anchor-permalink" href="#Create-a-model" title="Permalink"></a></h1><p>The package offers different ways to create models based on CRNs.</p><h2 id="Load-a-pre-written-model"><a class="docs-heading-anchor" href="#Load-a-pre-written-model">Load a pre-written model</a><a id="Load-a-pre-written-model-1"></a><a class="docs-heading-anchor-permalink" href="#Load-a-pre-written-model" title="Permalink"></a></h2><p>A bunch of models are already writtne within the package. If <code>str_model::String</code> is the name of an implemented model, then <code>load_model(str_model)</code> creates a variable with name <code>str_model</code>.</p><pre><code class="language-julia hljs">load_model(&quot;poisson&quot;)</code></pre><p>Available models are listed below.</p><h2 id="Define-a-Chemical-Reaction-Network"><a class="docs-heading-anchor" href="#Define-a-Chemical-Reaction-Network">Define a Chemical Reaction Network</a><a id="Define-a-Chemical-Reaction-Network-1"></a><a class="docs-heading-anchor-permalink" href="#Define-a-Chemical-Reaction-Network" title="Permalink"></a></h2><p>Let&#39;s consider the Chemical Reaction Network of the SIR model:</p><p>`` Infection: S + I \xrightarrow{k<em>i} 2I \
+<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Create a model · MarkovProcesses.jl</title><script data-outdated-warner src="assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.045/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.24/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="assets/documenter.js"></script><script src="siteinfo.js"></script><script src="../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="index.html"><img src="assets/logo.png" alt="MarkovProcesses.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit"><a href="index.html">MarkovProcesses.jl</a></span></div><form class="docs-search" action="search.html"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="index.html">Home</a></li><li><a class="tocitem" href="starting.html">Getting Started</a></li><li class="is-active"><a class="tocitem" href="create_model.html">Create a model</a><ul class="internal"><li><a class="tocitem" href="#Load-a-pre-written-model"><span>Load a pre-written model</span></a></li><li><a class="tocitem" href="#Define-a-Chemical-Reaction-Network"><span>Define a Chemical Reaction Network</span></a></li><li><a class="tocitem" href="#Manually-(advanced)"><span>Manually (advanced)</span></a></li><li><a class="tocitem" href="#List-of-pre-written-models"><span>List of pre-written models</span></a></li></ul></li><li><span class="tocitem">API</span><ul><li><a class="tocitem" href="api/model.html">Model</a></li><li><a class="tocitem" href="api/trajectory.html">Trajectory</a></li><li><a class="tocitem" href="api/abc.html">Approximate Bayesian Computation</a></li><li><a class="tocitem" href="api/plots.html">Plots</a></li></ul></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href="create_model.html">Create a model</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href="create_model.html">Create a model</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com//blob/master/docs/src/create_model.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Create-a-model"><a class="docs-heading-anchor" href="#Create-a-model">Create a model</a><a id="Create-a-model-1"></a><a class="docs-heading-anchor-permalink" href="#Create-a-model" title="Permalink"></a></h1><p>The package offers different ways to create models based on CRNs.</p><h2 id="Load-a-pre-written-model"><a class="docs-heading-anchor" href="#Load-a-pre-written-model">Load a pre-written model</a><a id="Load-a-pre-written-model-1"></a><a class="docs-heading-anchor-permalink" href="#Load-a-pre-written-model" title="Permalink"></a></h2><p>A bunch of models are already writtne within the package. If <code>str_model::String</code> is the name of an implemented model, then <code>load_model(str_model)</code> creates a variable with name <code>str_model</code>.</p><pre><code class="language-julia hljs">load_model(&quot;poisson&quot;)</code></pre><p>Available models are listed below.</p><h2 id="Define-a-Chemical-Reaction-Network"><a class="docs-heading-anchor" href="#Define-a-Chemical-Reaction-Network">Define a Chemical Reaction Network</a><a id="Define-a-Chemical-Reaction-Network-1"></a><a class="docs-heading-anchor-permalink" href="#Define-a-Chemical-Reaction-Network" title="Permalink"></a></h2><p>Let&#39;s consider the Chemical Reaction Network of the SIR model:</p><p>`` Infection: S + I \xrightarrow{k<em>i} 2I \
 Recovery: I \xrightarrow{k</em>r} R ``</p><p>The macro <code>@network_model</code> creates easily a CTMC stored in a <code>ContinuousTimeModel</code> variable based on this formalism.</p><pre><code class="language-julia hljs">julia&gt; easy_sir = @network_model begin
        Infection: (S + I =&gt; 2I, ki*I*S)
        Recovery: (I =&gt; R, kr*I)
@@ -78,4 +78,4 @@ tryhard_sir = TryhardSIRModel(dim_state_sir, dim_params_sir,
                               map_var_idx_sir, map_params_idx_sir, 
                               transitions_sir, p_sir, x0_sir, t0_sir, 
                               :sir_f!, :sir_isabsorbing; g = g_sir)
-σ = simulate(tryhard_sir)</code></pre><h2 id="List-of-pre-written-models"><a class="docs-heading-anchor" href="#List-of-pre-written-models">List of pre-written models</a><a id="List-of-pre-written-models-1"></a><a class="docs-heading-anchor-permalink" href="#List-of-pre-written-models" title="Permalink"></a></h2><ul><li><code>load_model(&quot;poisson&quot;)</code>: Poisson process</li><li><code>load_model(&quot;ER&quot;)</code>: Michaelis-Menten kinetics (Enzymatic Reactions)</li><li><code>load_model(&quot;SIR&quot;)</code>: Susceptible-Infected-Removed</li><li><code>load_model(&quot;doping_3way_oscillator&quot;)</code>: Three-way oscillator with doping reactions</li><li><code>load_model(&quot;repressilator&quot;)</code>: A repressilator model</li></ul></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="starting.html">« Getting Started</a><a class="docs-footer-nextpage" href="api/model.html">Model »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.17 on <span class="colophon-date" title="Tuesday 17 May 2022 07:23">Tuesday 17 May 2022</span>. Using Julia version 1.6.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
+σ = simulate(tryhard_sir)</code></pre><h2 id="List-of-pre-written-models"><a class="docs-heading-anchor" href="#List-of-pre-written-models">List of pre-written models</a><a id="List-of-pre-written-models-1"></a><a class="docs-heading-anchor-permalink" href="#List-of-pre-written-models" title="Permalink"></a></h2><ul><li><code>load_model(&quot;poisson&quot;)</code>: Poisson process</li><li><code>load_model(&quot;ER&quot;)</code>: Michaelis-Menten kinetics (Enzymatic Reactions)</li><li><code>load_model(&quot;SIR&quot;)</code>: Susceptible-Infected-Removed</li><li><code>load_model(&quot;doping_3way_oscillator&quot;)</code>: Three-way oscillator with doping reactions</li><li><code>load_model(&quot;repressilator&quot;)</code>: A repressilator model</li></ul></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="starting.html">« Getting Started</a><a class="docs-footer-nextpage" href="api/model.html">Model »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.24 on <span class="colophon-date" title="Wednesday 8 March 2023 15:42">Wednesday 8 March 2023</span>. Using Julia version 1.7.2.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
diff --git a/dev/index.html b/dev/index.html
index 3b0b3b9..eeddc51 100644
--- a/dev/index.html
+++ b/dev/index.html
@@ -1,2 +1,2 @@
 <!DOCTYPE html>
-<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Home · MarkovProcesses.jl</title><script data-outdated-warner src="assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.044/juliamono.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.11/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="assets/documenter.js"></script><script src="siteinfo.js"></script><script src="../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="index.html"><img src="assets/logo.png" alt="MarkovProcesses.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit"><a href="index.html">MarkovProcesses.jl</a></span></div><form class="docs-search" action="search.html"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li class="is-active"><a class="tocitem" href="index.html">Home</a><ul class="internal"><li><a class="tocitem" href="#Package-features"><span>Package features</span></a></li></ul></li><li><a class="tocitem" href="starting.html">Getting Started</a></li><li><a class="tocitem" href="create_model.html">Create a model</a></li><li><span class="tocitem">API</span><ul><li><a class="tocitem" href="api/model.html">Model</a></li><li><a class="tocitem" href="api/trajectory.html">Trajectory</a></li><li><a class="tocitem" href="api/abc.html">Approximate Bayesian Computation</a></li><li><a class="tocitem" href="api/plots.html">Plots</a></li></ul></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href="index.html">Home</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href="index.html">Home</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com//blob/master/docs/src/index.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="MarkovProcesses.jl"><a class="docs-heading-anchor" href="#MarkovProcesses.jl">MarkovProcesses.jl</a><a id="MarkovProcesses.jl-1"></a><a class="docs-heading-anchor-permalink" href="#MarkovProcesses.jl" title="Permalink"></a></h1><p><em>A package for simulation, verification and parameter estimation of Chemical Reaction Networks.</em></p><h2 id="Package-features"><a class="docs-heading-anchor" href="#Package-features">Package features</a><a id="Package-features-1"></a><a class="docs-heading-anchor-permalink" href="#Package-features" title="Permalink"></a></h2><ul><li>A core of simulation for Continuous-Time Markov Chains (CTMC) defined by Chemical Reaction Networks (CRN),</li><li>A simple interface for Biochemical Networks / Stochastic Petri Nets,</li><li>Synchronized simulation with Linear Hybrid Automata,</li><li>Approximate Bayesian Computation, a likelihood-free inference method,</li><li>Automaton-ABC: a statistical method for verification of parametric CTMCs.</li></ul></article><nav class="docs-footer"><a class="docs-footer-nextpage" href="starting.html">Getting Started »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.17 on <span class="colophon-date" title="Tuesday 17 May 2022 07:23">Tuesday 17 May 2022</span>. Using Julia version 1.6.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
+<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Home · MarkovProcesses.jl</title><script data-outdated-warner src="assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.045/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.24/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="assets/documenter.js"></script><script src="siteinfo.js"></script><script src="../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="index.html"><img src="assets/logo.png" alt="MarkovProcesses.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit"><a href="index.html">MarkovProcesses.jl</a></span></div><form class="docs-search" action="search.html"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li class="is-active"><a class="tocitem" href="index.html">Home</a><ul class="internal"><li><a class="tocitem" href="#Package-features"><span>Package features</span></a></li></ul></li><li><a class="tocitem" href="starting.html">Getting Started</a></li><li><a class="tocitem" href="create_model.html">Create a model</a></li><li><span class="tocitem">API</span><ul><li><a class="tocitem" href="api/model.html">Model</a></li><li><a class="tocitem" href="api/trajectory.html">Trajectory</a></li><li><a class="tocitem" href="api/abc.html">Approximate Bayesian Computation</a></li><li><a class="tocitem" href="api/plots.html">Plots</a></li></ul></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href="index.html">Home</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href="index.html">Home</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com//blob/master/docs/src/index.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="MarkovProcesses.jl"><a class="docs-heading-anchor" href="#MarkovProcesses.jl">MarkovProcesses.jl</a><a id="MarkovProcesses.jl-1"></a><a class="docs-heading-anchor-permalink" href="#MarkovProcesses.jl" title="Permalink"></a></h1><p><em>A package for simulation, verification and parameter estimation of Chemical Reaction Networks.</em></p><h2 id="Package-features"><a class="docs-heading-anchor" href="#Package-features">Package features</a><a id="Package-features-1"></a><a class="docs-heading-anchor-permalink" href="#Package-features" title="Permalink"></a></h2><ul><li>A core of simulation for Continuous-Time Markov Chains (CTMC) defined by Chemical Reaction Networks (CRN),</li><li>A simple interface for Biochemical Networks / Stochastic Petri Nets,</li><li>Synchronized simulation with Linear Hybrid Automata,</li><li>Approximate Bayesian Computation, a likelihood-free inference method,</li><li>Automaton-ABC: a statistical method for verification of parametric CTMCs.</li></ul></article><nav class="docs-footer"><a class="docs-footer-nextpage" href="starting.html">Getting Started »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.24 on <span class="colophon-date" title="Wednesday 8 March 2023 15:42">Wednesday 8 March 2023</span>. Using Julia version 1.7.2.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
diff --git a/dev/search.html b/dev/search.html
index e884a95..46ff602 100644
--- a/dev/search.html
+++ b/dev/search.html
@@ -1,2 +1,2 @@
 <!DOCTYPE html>
-<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Search · MarkovProcesses.jl</title><script data-outdated-warner src="assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.044/juliamono.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.11/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="assets/documenter.js"></script><script src="siteinfo.js"></script><script src="../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="index.html"><img src="assets/logo.png" alt="MarkovProcesses.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit"><a href="index.html">MarkovProcesses.jl</a></span></div><form class="docs-search" action="search.html"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="index.html">Home</a></li><li><a class="tocitem" href="starting.html">Getting Started</a></li><li><a class="tocitem" href="create_model.html">Create a model</a></li><li><span class="tocitem">API</span><ul><li><a class="tocitem" href="api/model.html">Model</a></li><li><a class="tocitem" href="api/trajectory.html">Trajectory</a></li><li><a class="tocitem" href="api/abc.html">Approximate Bayesian Computation</a></li><li><a class="tocitem" href="api/plots.html">Plots</a></li></ul></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href="search.html">Search</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href="search.html">Search</a></li></ul></nav><div class="docs-right"><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article><p id="documenter-search-info">Loading search...</p><ul id="documenter-search-results"></ul></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.17 on <span class="colophon-date" title="Tuesday 17 May 2022 07:23">Tuesday 17 May 2022</span>. Using Julia version 1.6.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body><script src="search_index.js"></script><script src="assets/search.js"></script></html>
+<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Search · MarkovProcesses.jl</title><script data-outdated-warner src="assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.045/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.24/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="assets/documenter.js"></script><script src="siteinfo.js"></script><script src="../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="index.html"><img src="assets/logo.png" alt="MarkovProcesses.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit"><a href="index.html">MarkovProcesses.jl</a></span></div><form class="docs-search" action="search.html"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="index.html">Home</a></li><li><a class="tocitem" href="starting.html">Getting Started</a></li><li><a class="tocitem" href="create_model.html">Create a model</a></li><li><span class="tocitem">API</span><ul><li><a class="tocitem" href="api/model.html">Model</a></li><li><a class="tocitem" href="api/trajectory.html">Trajectory</a></li><li><a class="tocitem" href="api/abc.html">Approximate Bayesian Computation</a></li><li><a class="tocitem" href="api/plots.html">Plots</a></li></ul></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href="search.html">Search</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href="search.html">Search</a></li></ul></nav><div class="docs-right"><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article><p id="documenter-search-info">Loading search...</p><ul id="documenter-search-results"></ul></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.24 on <span class="colophon-date" title="Wednesday 8 March 2023 15:42">Wednesday 8 March 2023</span>. Using Julia version 1.7.2.</p></section><footer class="modal-card-foot"></footer></div></div></div></body><script src="search_index.js"></script><script src="assets/search.js"></script></html>
diff --git a/dev/search_index.js b/dev/search_index.js
index 55ca67d..6711437 100644
--- a/dev/search_index.js
+++ b/dev/search_index.js
@@ -1,3 +1,3 @@
 var documenterSearchIndex = {"docs":
-[{"location":"api/trajectory.html#Trajectory-related-methods","page":"Trajectory","title":"Trajectory related methods","text":"","category":"section"},{"location":"api/trajectory.html","page":"Trajectory","title":"Trajectory","text":"Modules = [MarkovProcesses]\nPages   = [\"src/trajectory.jl\"]","category":"page"},{"location":"api/trajectory.html#MarkovProcesses.dist_lp-Tuple{AbstractTrajectory, AbstractTrajectory, Symbol}","page":"Trajectory","title":"MarkovProcesses.dist_lp","text":"dist_lp(σ1, σ2, var; verbose, p, str_stat)   \n\nFunction that computes Lp distance between two trajectories of any dimension. It computes Lp distances for each observed variable (contained in get_obs_var(σ)). and then apply a statistic on these distances. Requires get_obs_var(σ1) == get_obs_var(σ2), it is verified if they are simulated from the same model. ...\n\nArguments\n\nσ1::AbstractTrajectory is the first trajectory. σ2 is the second.\nvar::Symbol is an observed variable. Have to be contained in get_obs_var(σ1) and get_obs_var(σ2).\nverbose::Bool If true, launch a verbose execution of the computation. \n\n...\n\n\n\n\n\n","category":"method"},{"location":"api/trajectory.html#MarkovProcesses.dist_lp-Tuple{AbstractTrajectory, AbstractTrajectory}","page":"Trajectory","title":"MarkovProcesses.dist_lp","text":"dist_lp(σ1, σ2; verbose, p, str_stat)   \n\nFunction that computes Lp distance between two trajectories of any dimension. It computes Lp distances for each observed variable (contained in get_obs_var(σ)). and then apply a statistic on these distances. Requires get_obs_var(σ1) == get_obs_var(σ2), it is verified if they are simulated from the same model. ...\n\nArguments\n\nσ1::AbstractTrajectory is the first trajectory. σ2 is the second.\nverbose::Bool If true, launch a verbose execution of the computation. \nstr_stat::String allows to set the statistic to apply on the distances computed  of the trajectories. \n\nOnly \"mean\" is available for now on. ...\n\n\n\n\n\n","category":"method"},{"location":"api/trajectory.html#MarkovProcesses.dist_lp-Tuple{Vector{var\"#s18\"} where var\"#s18\"<:AbstractTrajectory, Vector{var\"#s19\"} where var\"#s19\"<:AbstractTrajectory}","page":"Trajectory","title":"MarkovProcesses.dist_lp","text":"dist_lp(l_σ1, l_σ2; verbose, p, str_stat_list, str_stat_trajectory) \n\nFunction that computes Lp distance between two set of any dimensional trajectories. ...\n\nArguments\n\nl_σ1::Vector{AbstractTrajectory} is the first set of trajectories. l_σ2 is the second.\nverbose::Bool If true, launch a verbose execution of the computation. \nstr_stat_list::String allows to set the statistic to apply on the distances of the trajectories. \n\nIt is salso called linkage function in clustering field. Only \"mean\" is available for now on. ...\n\n\n\n\n\n","category":"method"},{"location":"api/abc.html#Approximate-Bayesian-Computation-related-methods","page":"Approximate Bayesian Computation","title":"Approximate Bayesian Computation related methods","text":"","category":"section"},{"location":"api/abc.html","page":"Approximate Bayesian Computation","title":"Approximate Bayesian Computation","text":"Modules = [MarkovProcesses]\nPages   = [\"algorithms/abc_smc.jl\", \"algorithms/abc_model_choice.jl\"]","category":"page"},{"location":"api/abc.html#MarkovProcesses.abc_smc-Tuple{ParametricModel, AbstractVector{T} where T, Function}","page":"Approximate Bayesian Computation","title":"MarkovProcesses.abc_smc","text":"abc_smc(pm::ParametricModel, l_obs, func_dist; nbr_particles, alpha, kernel_type, NT\n        duration_time, bound_sim, sym_var_aut, verbose)\n\nRun the ABC-SMC algorithm with the pm parametric model. \n\nfunc_dist(l_sim, l_obs) is the distance function between simulations and observation,  it corresponds to rho(eta(y_sim) eta(y_exp)). l_obs::Vector{<:T2} is a collection of observations. dist must have a signature of the form func_dist(l_sim::Vector{T1}, l_obs::Vector{T2}).\n\nIf pm is defined on a ContinuousTimeModel, then T1 should verify T1 <: Trajectory.\n\n!!! Distance function and distributed ABC     If you use abc_smc with multiple workers, dist has to be defined      on every workers by using @everywhere.\n\n\n\n\n\n","category":"method"},{"location":"api/abc.html#MarkovProcesses.abc_model_choice_dataset-Tuple{Vector{var\"#s109\"} where var\"#s109\"<:Union{Model, ParametricModel}, Any, Function, Function, Int64, Int64}","page":"Approximate Bayesian Computation","title":"MarkovProcesses.abc_model_choice_dataset","text":"abc_model_choice_dataset(models,\n                         summary_stats_observations,\n                         summary_stats_func::Function, distance_func::Function,\n                         k::Int, N_ref::Int; dir_results::Union{Nothing,String} = nothing)\n\nCreates a reference table for ABC model choice with discrete uniform prior distribution over the models.\n\n\n\n\n\n","category":"method"},{"location":"api/abc.html#MarkovProcesses.abc_model_choice_dataset-Tuple{Vector{var\"#s109\"} where var\"#s109\"<:Union{Model, ParametricModel}, Distribution{Distributions.Univariate, Distributions.Discrete}, Any, Function, Function, Int64, Int64}","page":"Approximate Bayesian Computation","title":"MarkovProcesses.abc_model_choice_dataset","text":"abc_model_choice_dataset(models, models_prior,\n                         summary_stats_observations,\n                         summary_stats_func::Function, distance_func::Function,\n                         k::Int, N_ref::Int; dir_results::Union{Nothing,String} = nothing)\n\nCreates a reference table for ABC model choice.\n\nThe mandatory arguments are:\n\nmodels is a list of objects inherited from Model or ParametricModel,\nmodels_prior: the prior over the models (by default: discrete uniform distribution)\nsummary_stats_observations are the summary statitics of the observations,\nsummary_stats_func::Function: the function that computes the summary statistics over a model simulation,\ndistance_func: the distance function over the summary statistics space,\nN_ref: the number of samples in the reference table,\nk: the k nearest samples from the observations to keep in the reference table (k < N_ref).\n\nThe result is a AbcModelChoiceDataset with fields:\n\nsummary_stats_matrix: the (Nstats, Nref) features matrix. Accessible via .X.\nmodels_indexes: the labels vector. Accessible via .y.\n\nIf specified, dir_results is the directory where the summary statistics matrix and associated models are stored (CSV).\n\n\n\n\n\n","category":"method"},{"location":"api/abc.html#MarkovProcesses.posterior_proba_model-Tuple{MarkovProcesses.RandomForestABC}","page":"Approximate Bayesian Computation","title":"MarkovProcesses.posterior_proba_model","text":"posterior_proba_model(rf_abc::RandomForestABC)\n\nEstimates the posterior probability of the model P(M = widehatM(s_obs)  s_obs) with the Random Forest ABC method.\n\n\n\n\n\n","category":"method"},{"location":"api/abc.html#MarkovProcesses.rf_abc_model_choice-Tuple{Vector{var\"#s109\"} where var\"#s109\"<:Union{Model, ParametricModel}, Any, Function, Int64}","page":"Approximate Bayesian Computation","title":"MarkovProcesses.rf_abc_model_choice","text":"rf_abc_model_choice(models, summary_stats_observations,\n                    summary_stats_func::Function, N_ref::Int;\n                    k::Int = N_ref, distance_func::Function = (x,y) -> 1, \n                    hyperparameters_range::Dict)\n\nRun the Random Forest Approximate Bayesian Computation model choice method.\n\nThe mandatory arguments are:\n\nmodels is a list of objects inherited from Model or ParametricModel,\nsummary_stats_observations are the summary statitics of the observations\nN_ref: the number of samples in the reference table.\nsummary_stats_func::Function: the function that computes the summary statistics over a model simulation.\n\nThe optional arguments are:\n\nmodels_prior: the prior over the models (by default: discrete uniform distribution)\nk: the k nearest samples from the observations to keep in the reference table (by default: k = N_ref)\ndistance_func: the distance function, has to be defined if k < N_ref\nhyperparameters_range: a dict with the hyperparameters range values for the cross validation   fit of the Random Forest (by default: Dict(:n_estimators => [200], :min_samples_leaf => [1], :min_samples_split => [2])).   See scikit-learn documentation of RandomForestClassifier for the hyperparameters name.\n\nThe result is a RandomForestABC object with fields:\n\nreference_table an AbcModelChoiceDataset that corresponds to the reference table of the algorithm, \nclf a random forest classifier (PyObject from scikit-learn),\nsummary_stats_observations are the summary statitics of the observations\nestim_model is the underlying model of the observations inferred with the RF-ABC method.\n\n\n\n\n\n","category":"method"},{"location":"api/model.html#Model-test-related-methods","page":"Model","title":"Model test related methods","text":"","category":"section"},{"location":"api/model.html","page":"Model","title":"Model","text":"Modules = [MarkovProcesses]\nPages   = [\"src/model.jl\"]","category":"page"},{"location":"api/model.html#MarkovProcesses.change_simulation_stop_criteria-Tuple{ContinuousTimeModel, Symbol}","page":"Model","title":"MarkovProcesses.change_simulation_stop_criteria","text":"change_simulation_stop_criteria(m::ContinuousTimeModel, isabsorbing_func::Symbol)\n\nChange the simulation of the model m by adding a stop criteria based on the function named isabsorbing_func::Symbol. isabsorbing_func must have the type signature isabsorbing_func(p::Vector{Float64}, x::Vector{Int}) where p is the parameter vector of the model and x a state (not an observed state) of the model.\n\n\n\n\n\n","category":"method"},{"location":"api/model.html#MarkovProcesses.distribute_mean_value_lha-Tuple{SynchronizedModel, Symbol, Int64}","page":"Model","title":"MarkovProcesses.distribute_mean_value_lha","text":"distribute_mean_value_lha(sm::SynchronizedModel, sym_var::Symbol, nbr_stim::Int)\n\nDistribute over workers the computation of the mean value  of an LHA over nbr_sim simulations of the model.\n\n\n\n\n\n","category":"method"},{"location":"api/model.html#MarkovProcesses.draw!-Tuple{AbstractMatrix{Float64}, ParametricModel}","page":"Model","title":"MarkovProcesses.draw!","text":"draw!(mat_p, pm)\n\nDraw size(mat_p)[2] (number of columns of mat_p) parameters from the prior distribution  defined in pm and stores it in mat_p.\n\n\n\n\n\n","category":"method"},{"location":"api/model.html#MarkovProcesses.draw!-Tuple{AbstractVector{Float64}, ParametricModel}","page":"Model","title":"MarkovProcesses.draw!","text":"draw!(vec_p, pm)\n\nDraw a parameter from the prior distribution defined in pm and stores it in vec_p.\n\n\n\n\n\n","category":"method"},{"location":"api/model.html#MarkovProcesses.draw_model!-Tuple{ParametricModel}","page":"Model","title":"MarkovProcesses.draw_model!","text":"draw_model!(pm::ParametricModel)\n\nDraw a parameter from the prior disitribution defined in pm::ParametricModel and save it in the model contained in pm.\n\n\n\n\n\n","category":"method"},{"location":"api/model.html#MarkovProcesses.prior_pdf!-Tuple{AbstractVector{Float64}, ParametricModel, AbstractMatrix{Float64}}","page":"Model","title":"MarkovProcesses.prior_pdf!","text":"prior_pdf(res_pdf, mat_p, pm)\n\nComputes the density for each column of mat_p of the prior distribution defined in pm. Stores it in res_pdf. (length(vec_res) == size(mat_p)[2])\n\n\n\n\n\n","category":"method"},{"location":"api/model.html#MarkovProcesses.prior_pdf-Tuple{ParametricModel, AbstractVector{Float64}}","page":"Model","title":"MarkovProcesses.prior_pdf","text":"prior_pdf(p_prior, pm)\n\nComputes the density at p_prior of the prior distribution defined in pm.\n\n\n\n\n\n","category":"method"},{"location":"api/model.html#MarkovProcesses.probability_var_value_lha-Tuple{SynchronizedModel, Int64}","page":"Model","title":"MarkovProcesses.probability_var_value_lha","text":"distribute_var_value_lha(sm::SynchronizedModel, nbr_sim::Int, value = 0, sym_var = :d)\n\nCompute the probability that the variable sym_var is equal to value of an LHA over nbr_sim simulations of the model.\n\n\n\n\n\n","category":"method"},{"location":"api/model.html#MarkovProcesses.simulate-Tuple{ParametricModel, AbstractVector{Float64}}","page":"Model","title":"MarkovProcesses.simulate","text":"simulate(pm::ParametricModel, p_prior::AbstractVector{Float64})\n\nSimulates the model contained in the parametric model pm with the p_prior parameters. It simulates the model by taking the parameters contained in get_proba_model(pm).p and replace the 1D parameters pm.params with p_prior.\n\n\n\n\n\n","category":"method"},{"location":"api/model.html#MarkovProcesses.volatile_simulate-Tuple{ParametricModel, AbstractVector{Float64}}","page":"Model","title":"MarkovProcesses.volatile_simulate","text":"volatile_simulate(pm::ParametricModel, p_prior::AbstractVector{Float64})\n\nA volatile version of simulate(pm::ParametricModel, p_prior::AbstractVector{Float64}). The model in pm should be of type SynchronizedModel (typeof(pm.m) <: SynchronizedModel). It returns S::StateLHA, not a trajectory.\n\n\n\n\n\n","category":"method"},{"location":"api/model.html#MarkovProcesses.volatile_simulate-Tuple{SynchronizedModel}","page":"Model","title":"MarkovProcesses.volatile_simulate","text":"volatile_simulate(sm::SynchronizedModel; p, verbose)\n\nSimulates a model synchronized with an automaton but does not store the values of the simulation  in order to improve performance. It returns the last state of the simulation S::StateLHA not a trajectory σ::SynchronizedTrajectory.\n\n\n\n\n\n","category":"method"},{"location":"create_model.html#Create-a-model","page":"Create a model","title":"Create a model","text":"","category":"section"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"The package offers different ways to create models based on CRNs.","category":"page"},{"location":"create_model.html#Load-a-pre-written-model","page":"Create a model","title":"Load a pre-written model","text":"","category":"section"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"A bunch of models are already writtne within the package. If str_model::String is the name of an implemented model, then load_model(str_model) creates a variable with name str_model.","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"load_model(\"poisson\")","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"Available models are listed below.","category":"page"},{"location":"create_model.html#Define-a-Chemical-Reaction-Network","page":"Create a model","title":"Define a Chemical Reaction Network","text":"","category":"section"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"Let's consider the Chemical Reaction Network of the SIR model:","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"`` Infection: S + I \\xrightarrow{ki} 2I \\\nRecovery: I \\xrightarrow{kr} R ``","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"The macro @network_model creates easily a CTMC stored in a ContinuousTimeModel variable based on this formalism.","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"julia> easy_sir = @network_model begin\n       Infection: (S + I => 2I, ki*I*S)\n       Recovery: (I => R, kr*I)\n       end \"My awesome SIR\"\nMy_awesome_SIRModel <: ContinuousTimeModel model\n- variables :\n* I (index = 2 in state space)\n* R (index = 3 in state space)\n* S (index = 1 in state space)\n- parameters :\n* ki (index = 1 in parameter space)\n* kr (index = 2 in parameter space)\n- transitions : Infection,Recovery\n- observed variables :\n* S (index = 1 in observed state space, index = 1 in state space)\n* I (index = 2 in observed state space, index = 2 in state space)\n* R (index = 3 in observed state space, index = 3 in state space)\np = [0.0, 0.0]\nx0 = [0, 0, 0]\nt0 = 0.0\ntime bound = Inf","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"In the first reaction, ki*I*S is the reaction rate of the reaction Infection. This model is almost ready to use, we have to set the initial state and the parameters.","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"julia> set_param!(easy_sir, [0.0012, 0.05])\n       set_x0!(easy_sir, [95, 5, 0])\n       σ = simulate(easy_sir)\n       load_plots()\n       plot(σ)","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"(Image: Plot of a simulated SIR trajectory)","category":"page"},{"location":"create_model.html#Manually-(advanced)","page":"Create a model","title":"Manually (advanced)","text":"","category":"section"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"This page is intented to advanced uses of the package, in order to use","category":"page"},{"location":"create_model.html#Based-on-an-existing-model","page":"Create a model","title":"Based on an existing model","text":"","category":"section"},{"location":"create_model.html#From-scratch","page":"Create a model","title":"From scratch","text":"","category":"section"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"When the above cases don't fit your application one can create manually a ContinuousTimeModel. Let's take a look about the signature of the constructor method:","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"function ContinuousTimeModel(dim_state::Int, dim_params::Int, map_var_idx::Dict{VariableModel,Int}, \n                             map_param_idx::Dict{ParameterModel,Int}, transitions::Vector{<:Transition},\n                             p::Vector{Float64}, x0::Vector{Int}, t0::Float64, \n                             f!::Function, isabsorbing::Function; kwargs)","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"Let's construct an SIR model manually. First, one has to specify the dimensions of the state space and the parameter space.","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"dim_state_sir, dim_params_sir = 3, 2","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"map_var_idx is a dictionary that maps each model variable (represented by a Symbol) to an index in the state space.","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"map_var_idx_sir = Dict(:S => 1, :I => 2, :R => 3)","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"map_var_params is the equivalent of map_var_idx for parameters.","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"map_params_idx_sir = Dict(:ki => 1, :kr => 2)","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"transitions are the transitions/reactions of the model (vector of Symbol), p, x0 and t0 are respectively the parameters, the initial state and initial time of the model.","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"transitions_sir = [:Infection, :Recovery]\np_sir = [0.0012, 0.05]\nx0_sir = [95, 5, 0]\nt0_sir = 0.0","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"The two last arguments are functions, the first one, called f! must have the signature:","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"function f!(xnplus1::Vector{Int}, ptr_t::Vector{Float64}, ptr_tr::Vector{Transition},\n            xn::Vector{Int}, tn::Float64, p::Vector{Float64})","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"It should return nothing. xnplus1, ptr_t and ptr_tr are vectors where the next values are stored. ptr_t is of length 1 and stores the next time value (ptr_t[1] = tn + delta_t) whereas ptr_tr stores the name of the next transition/reaction (ptr_tr[1] = :Infection for example). This function is implemented in the package as:","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"@everywhere function sir_f!(xnplus1::Vector{Int}, l_t::Vector{Float64}, l_tr::Vector{Transition},\n                             xn::Vector{Int}, tn::Float64, p::Vector{Float64})\n    @inbounds a1 = p[1] * xn[1] * xn[2]\n    @inbounds a2 = p[2] * xn[2]\n    l_a = (a1, a2)\n    asum = sum(l_a)\n    if asum == 0.0\n        copyto!(xnplus1, xn)\n        return nothing\n    end\n    nu_1 = (-1, 1, 0)\n    nu_2 = (0, -1, 1)\n    l_nu = (nu_1, nu_2)\n    l_str_R = (:Infection, :Recovery)\n\n    u1 = rand()\n    u2 = rand()\n    tau = - log(u1) / asum\n    b_inf = 0.0\n    b_sup = a1\n    reaction = 0\n    for i = 1:2 \n        if b_inf < asum*u2 < b_sup\n            reaction = i\n            break\n        end\n        @inbounds b_inf += l_a[i]\n        @inbounds b_sup += l_a[i+1]\n    end\n \n    nu = l_nu[reaction]\n    for i = 1:3\n        @inbounds xnplus1[i] = xn[i]+nu[i]\n    end\n    @inbounds l_t[1] = tn + tau\n    @inbounds l_tr[1] = l_str_R[reaction]\nend","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"i The second function called isaborbing must have the signature:","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"isabsorbing(p::Vector{Float64}, xn::Vector{Int})","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"This function checks if the state xn is an absorbing state according to the model parametrised by p. It has to return true or false.","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"For a CTMC, a state is an absorbing state if the total exit rate is zero. In the case of the SIR model;","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"@everywhere sir_isabsorbing(p::Vector{Float64}, xn::Vector{Int}) = (p[1]*xn[1]*xn[2] + p[2]*xn[2]) === 0.0","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"Finally one sets the observed variables and the model can be created. The following lines creates a new type TryhardSIRModel <: ContinuousTimeModel, and the core of simulation.","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"g_sir = [:I]\n\n# Generates simulate method for the new model\n@everywhere @eval $(MarkovProcesses.generate_code_model_type_def(:TryhardSIRModel))\n@everywhere @eval $(MarkovProcesses.generate_code_model_type_constructor(:TryhardSIRModel))\n@everywhere @eval $(MarkovProcesses.generate_code_simulation(:TryhardSIRModel, :sir_f!, :sir_isabsorbing))\n\ntryhard_sir = TryhardSIRModel(dim_state_sir, dim_params_sir, \n                              map_var_idx_sir, map_params_idx_sir, \n                              transitions_sir, p_sir, x0_sir, t0_sir, \n                              :sir_f!, :sir_isabsorbing; g = g_sir)\nσ = simulate(tryhard_sir)","category":"page"},{"location":"create_model.html#List-of-pre-written-models","page":"Create a model","title":"List of pre-written models","text":"","category":"section"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"load_model(\"poisson\"): Poisson process\nload_model(\"ER\"): Michaelis-Menten kinetics (Enzymatic Reactions)\nload_model(\"SIR\"): Susceptible-Infected-Removed\nload_model(\"doping_3way_oscillator\"): Three-way oscillator with doping reactions\nload_model(\"repressilator\"): A repressilator model","category":"page"},{"location":"starting.html#Getting-Started","page":"Getting Started","title":"Getting Started","text":"","category":"section"},{"location":"starting.html#Installation","page":"Getting Started","title":"Installation","text":"","category":"section"},{"location":"starting.html","page":"Getting Started","title":"Getting Started","text":"Launch Julia's REPL (for example by entering julia in your shell)\nEnter Pkg's REPL by typing ]\nEnter\npkg> add https://gitlab-research.centralesupelec.fr/2017bentrioum/markovprocesses.jl/","category":"page"},{"location":"starting.html#Context-Mathematical-framework","page":"Getting Started","title":"Context - Mathematical framework","text":"","category":"section"},{"location":"starting.html","page":"Getting Started","title":"Getting Started","text":"In this package, we are focused on Continuous-Time Markov Chains (CTMC, also called Markov jump processes), that can be described by Chemical Reaction Networks. The future state only depends on the current state. It is defined by two properties:","category":"page"},{"location":"starting.html","page":"Getting Started","title":"Getting Started","text":"forall t s in mathbbR_geq 0 mathbbP(S_t  S_v v in 0s) = mathbbP(S_t S_s) (Memoryless/Markov property)\nforall tv in mathbbR_geq 0 t  v mathbbP(S_t  S_v) = mathbbP(S_t-v  S_0) (Time-homogeneity).","category":"page"},{"location":"starting.html","page":"Getting Started","title":"Getting Started","text":"A Chemical Reaction Network (CRN) is a formalism that describes biological phenomena. An example is the Susceptible-Infected-Removed model (SIR):","category":"page"},{"location":"starting.html","page":"Getting Started","title":"Getting Started","text":"R_1 S + I xrightarrowk_i 2I R_2 I xrightarrowk_r R","category":"page"},{"location":"starting.html","page":"Getting Started","title":"Getting Started","text":"This CRN has two reactions that models two phenomena: infection (R_1) or immunisation (R_2). Each reaction is parametrized by a kinetic rate (k_i or k_r). The stochastic dynamics of a CRN are described by CTMCs.","category":"page"},{"location":"starting.html#Models","page":"Getting Started","title":"Models","text":"","category":"section"},{"location":"starting.html","page":"Getting Started","title":"Getting Started","text":"In the package, models are objects and their types all derived from the abstract type Model. Let's load the SIR model, which is pre-written within the package.","category":"page"},{"location":"starting.html","page":"Getting Started","title":"Getting Started","text":"julia> load_model(\"SIR\")\ncreate_SIR (generic function with 1 method)\n\njulia> println(SIR)\nSIRModel <: ContinuousTimeModel model\n- variables :\n* I (index = 2 in state space)\n* R (index = 3 in state space)\n* S (index = 1 in state space)\n- parameters :\n* ki (index = 1 in parameter space)\n* kr (index = 2 in parameter space)\n- transitions : R1,R2\n- observed variables :\n* I (index = 1 in observed state space, index = 2 in state space)\np = [0.0012, 0.05]\nx0 = [95, 5, 0]\nt0 = 0.0\ntime bound = Inf","category":"page"},{"location":"starting.html","page":"Getting Started","title":"Getting Started","text":"load_model has created a variable called SIR, which contains all the information for simulating the SIR model described above. It also contains a parameter vector and an initial point.","category":"page"},{"location":"starting.html","page":"Getting Started","title":"Getting Started","text":"julia> @show SIR.p \n       @show SIR.x0\nSIR.p = [0.0012, 0.05]\nSIR.x0 = [95, 5, 0]","category":"page"},{"location":"starting.html","page":"Getting Started","title":"Getting Started","text":"You can change the parameters or the initial state with the functions set_param! and set_x0!.","category":"page"},{"location":"starting.html","page":"Getting Started","title":"Getting Started","text":"julia> set_param!(SIR, :ki, 0.015)\njulia> @show SIR.p\nSIR.p = [0.015, 0.05]\n\njulia> set_param!(SIR, [0.02, 0.07])\njulia> @show SIR.p\nSIR.p = [0.02, 0.07]\n\njulia> set_x0!(SIR, :S, 93)\njulia> @show SIR.x0\nSIR.x0 = [93, 5, 0]","category":"page"},{"location":"starting.html#Trajectories","page":"Getting Started","title":"Trajectories","text":"","category":"section"},{"location":"starting.html","page":"Getting Started","title":"Getting Started","text":"The simulation of the model is done by the function simulate.","category":"page"},{"location":"starting.html","page":"Getting Started","title":"Getting Started","text":"julia> σ = simulate(SIR)","category":"page"},{"location":"starting.html","page":"Getting Started","title":"Getting Started","text":"simulate returns a trajectory, which type is derived from AbstractTrajectory. It can be either an object of type Trajectory for models ::ContinuousTimeModel or SynchronizedTrajectory for models that includes an automaton (but this is the subject of another section). It is easy to access the values of a trajectory.","category":"page"},{"location":"starting.html","page":"Getting Started","title":"Getting Started","text":"julia> @show σ[3] # the third state of the trajectory\n       @show length_states(σ) # number of states\n       @show σ[:I, 4] # Fourth value of the variable I\n       @show σ.I[4] # Fourth value of the variable I\n       @show get_state_from_time(σ, 2.3)\n\nσ[3] = [7]\nlength_states(σ) = 196\nσ[:I, 4] = 8\nσ.I[4] = 8\nget_state_from_time(σ, 2.3) = [79]","category":"page"},{"location":"starting.html","page":"Getting Started","title":"Getting Started","text":"The SIR object includes an observation model symbolized by the vector SIR.g. Even if the variables of the model are [:S, :I, :R], only I will be observed.","category":"page"},{"location":"starting.html","page":"Getting Started","title":"Getting Started","text":"julia> @show SIR.map_var_idx\n       @show SIR.g\n       @show size(σ.values), length(σ[:I]) # Only one column which corresponds to the I variable\nSIR.map_var_idx = Dict(:I => 2,:R => 3,:S => 1)\nSIR.g = [:I]\n(size(σ.values), length(σ[:I])) = ((1,), 196)","category":"page"},{"location":"starting.html","page":"Getting Started","title":"Getting Started","text":"The SIR model is by default unbounded, i.e. each trajectory is simulated until it reaches an absorbing state.","category":"page"},{"location":"starting.html","page":"Getting Started","title":"Getting Started","text":"julia> @show isbounded(SIR)\n       @show isbounded(σ)\nisbounded(SIR) = false\nisbounded(σ) = false","category":"page"},{"location":"starting.html","page":"Getting Started","title":"Getting Started","text":"We can bound the SIR's trajectories until time 120 by running set_time_bound!(SIR, 120.0).","category":"page"},{"location":"index.html","page":"Home","title":"Home","text":"CurrentModule = MarkovProcesses","category":"page"},{"location":"index.html#MarkovProcesses.jl","page":"Home","title":"MarkovProcesses.jl","text":"","category":"section"},{"location":"index.html","page":"Home","title":"Home","text":"A package for simulation, verification and parameter estimation of Chemical Reaction Networks.","category":"page"},{"location":"index.html#Package-features","page":"Home","title":"Package features","text":"","category":"section"},{"location":"index.html","page":"Home","title":"Home","text":"A core of simulation for Continuous-Time Markov Chains (CTMC) defined by Chemical Reaction Networks (CRN),\nA simple interface for Biochemical Networks / Stochastic Petri Nets,\nSynchronized simulation with Linear Hybrid Automata,\nApproximate Bayesian Computation, a likelihood-free inference method,\nAutomaton-ABC: a statistical method for verification of parametric CTMCs.","category":"page"},{"location":"api/plots.html#Plots-related-methods","page":"Plots","title":"Plots related methods","text":"","category":"section"},{"location":"api/plots.html","page":"Plots","title":"Plots","text":"Modules = [MarkovProcesses]\nPages   = [\"src/plots.jl\"]","category":"page"}]
+[{"location":"api/trajectory.html#Trajectory-related-methods","page":"Trajectory","title":"Trajectory related methods","text":"","category":"section"},{"location":"api/trajectory.html","page":"Trajectory","title":"Trajectory","text":"Modules = [MarkovProcesses]\nPages   = [\"src/trajectory.jl\"]","category":"page"},{"location":"api/trajectory.html#MarkovProcesses.dist_lp-Tuple{AbstractTrajectory, AbstractTrajectory, Symbol}","page":"Trajectory","title":"MarkovProcesses.dist_lp","text":"dist_lp(σ1, σ2, var; verbose, p, str_stat)   \n\nFunction that computes Lp distance between two trajectories of any dimension. It computes Lp distances for each observed variable (contained in get_obs_var(σ)). and then apply a statistic on these distances. Requires get_obs_var(σ1) == get_obs_var(σ2), it is verified if they are simulated from the same model. ...\n\nArguments\n\nσ1::AbstractTrajectory is the first trajectory. σ2 is the second.\nvar::Symbol is an observed variable. Have to be contained in get_obs_var(σ1) and get_obs_var(σ2).\nverbose::Bool If true, launch a verbose execution of the computation. \n\n...\n\n\n\n\n\n","category":"method"},{"location":"api/trajectory.html#MarkovProcesses.dist_lp-Tuple{AbstractTrajectory, AbstractTrajectory}","page":"Trajectory","title":"MarkovProcesses.dist_lp","text":"dist_lp(σ1, σ2; verbose, p, str_stat)   \n\nFunction that computes Lp distance between two trajectories of any dimension. It computes Lp distances for each observed variable (contained in get_obs_var(σ)). and then apply a statistic on these distances. Requires get_obs_var(σ1) == get_obs_var(σ2), it is verified if they are simulated from the same model. ...\n\nArguments\n\nσ1::AbstractTrajectory is the first trajectory. σ2 is the second.\nverbose::Bool If true, launch a verbose execution of the computation. \nstr_stat::String allows to set the statistic to apply on the distances computed  of the trajectories. \n\nOnly \"mean\" is available for now on. ...\n\n\n\n\n\n","category":"method"},{"location":"api/trajectory.html#MarkovProcesses.dist_lp-Tuple{Vector{<:AbstractTrajectory}, Vector{<:AbstractTrajectory}}","page":"Trajectory","title":"MarkovProcesses.dist_lp","text":"dist_lp(l_σ1, l_σ2; verbose, p, str_stat_list, str_stat_trajectory) \n\nFunction that computes Lp distance between two set of any dimensional trajectories. ...\n\nArguments\n\nl_σ1::Vector{AbstractTrajectory} is the first set of trajectories. l_σ2 is the second.\nverbose::Bool If true, launch a verbose execution of the computation. \nstr_stat_list::String allows to set the statistic to apply on the distances of the trajectories. \n\nIt is salso called linkage function in clustering field. Only \"mean\" is available for now on. ...\n\n\n\n\n\n","category":"method"},{"location":"api/abc.html#Approximate-Bayesian-Computation-related-methods","page":"Approximate Bayesian Computation","title":"Approximate Bayesian Computation related methods","text":"","category":"section"},{"location":"api/abc.html","page":"Approximate Bayesian Computation","title":"Approximate Bayesian Computation","text":"Modules = [MarkovProcesses]\nPages   = [\"algorithms/abc_smc.jl\", \"algorithms/abc_model_choice.jl\"]","category":"page"},{"location":"api/abc.html#MarkovProcesses.abc_smc-Tuple{ParametricModel, AbstractVector, Function}","page":"Approximate Bayesian Computation","title":"MarkovProcesses.abc_smc","text":"abc_smc(pm::ParametricModel, l_obs, func_dist; nbr_particles, alpha, kernel_type, NT\n        duration_time, bound_sim, sym_var_aut, verbose)\n\nRun the ABC-SMC algorithm with the pm parametric model. \n\nfunc_dist(l_sim, l_obs) is the distance function between simulations and observation,  it corresponds to rho(eta(y_sim) eta(y_exp)). l_obs::Vector{<:T2} is a collection of observations. dist must have a signature of the form func_dist(l_sim::Vector{T1}, l_obs::Vector{T2}).\n\nIf pm is defined on a ContinuousTimeModel, then T1 should verify T1 <: Trajectory.\n\n!!! Distance function and distributed ABC     If you use abc_smc with multiple workers, dist has to be defined      on every workers by using @everywhere.\n\n\n\n\n\n","category":"method"},{"location":"api/abc.html#MarkovProcesses.abc_model_choice_dataset-Tuple{Vector{<:Union{Model, ParametricModel}}, Any, Function, Function, Int64, Int64}","page":"Approximate Bayesian Computation","title":"MarkovProcesses.abc_model_choice_dataset","text":"abc_model_choice_dataset(models,\n                         summary_stats_observations,\n                         summary_stats_func::Function, distance_func::Function,\n                         k::Int, N_ref::Int; dir_results::Union{Nothing,String} = nothing)\n\nCreates a reference table for ABC model choice with discrete uniform prior distribution over the models.\n\n\n\n\n\n","category":"method"},{"location":"api/abc.html#MarkovProcesses.abc_model_choice_dataset-Tuple{Vector{<:Union{Model, ParametricModel}}, Distribution{Distributions.Univariate, Distributions.Discrete}, Any, Function, Function, Int64, Int64}","page":"Approximate Bayesian Computation","title":"MarkovProcesses.abc_model_choice_dataset","text":"abc_model_choice_dataset(models, models_prior,\n                         summary_stats_observations,\n                         summary_stats_func::Function, distance_func::Function,\n                         k::Int, N_ref::Int; dir_results::Union{Nothing,String} = nothing)\n\nCreates a reference table for ABC model choice.\n\nThe mandatory arguments are:\n\nmodels is a list of objects inherited from Model or ParametricModel,\nmodels_prior: the prior over the models (by default: discrete uniform distribution)\nsummary_stats_observations are the summary statitics of the observations,\nsummary_stats_func::Function: the function that computes the summary statistics over a model simulation,\ndistance_func: the distance function over the summary statistics space,\nN_ref: the number of samples in the reference table,\nk: the k nearest samples from the observations to keep in the reference table (k < N_ref).\n\nThe result is a AbcModelChoiceDataset with fields:\n\nsummary_stats_matrix: the (Nstats, Nref) features matrix. Accessible via .X.\nmodels_indexes: the labels vector. Accessible via .y.\n\nIf specified, dir_results is the directory where the summary statistics matrix and associated models are stored (CSV).\n\n\n\n\n\n","category":"method"},{"location":"api/abc.html#MarkovProcesses.posterior_proba_model-Tuple{MarkovProcesses.RandomForestABC}","page":"Approximate Bayesian Computation","title":"MarkovProcesses.posterior_proba_model","text":"posterior_proba_model(rf_abc::RandomForestABC)\n\nEstimates the posterior probability of the model P(M = widehatM(s_obs)  s_obs) with the Random Forest ABC method.\n\n\n\n\n\n","category":"method"},{"location":"api/abc.html#MarkovProcesses.rf_abc_model_choice-Tuple{Vector{<:Union{Model, ParametricModel}}, Any, Function, Int64}","page":"Approximate Bayesian Computation","title":"MarkovProcesses.rf_abc_model_choice","text":"rf_abc_model_choice(models, summary_stats_observations,\n                    summary_stats_func::Function, N_ref::Int;\n                    k::Int = N_ref, distance_func::Function = (x,y) -> 1, \n                    hyperparameters_range::Dict)\n\nRun the Random Forest Approximate Bayesian Computation model choice method.\n\nThe mandatory arguments are:\n\nmodels is a list of objects inherited from Model or ParametricModel,\nsummary_stats_observations are the summary statitics of the observations\nN_ref: the number of samples in the reference table.\nsummary_stats_func::Function: the function that computes the summary statistics over a model simulation.\n\nThe optional arguments are:\n\nmodels_prior: the prior over the models (by default: discrete uniform distribution)\nk: the k nearest samples from the observations to keep in the reference table (by default: k = N_ref)\ndistance_func: the distance function, has to be defined if k < N_ref\nhyperparameters_range: a dict with the hyperparameters range values for the cross validation   fit of the Random Forest (by default: Dict(:n_estimators => [200], :min_samples_leaf => [1], :min_samples_split => [2])).   See scikit-learn documentation of RandomForestClassifier for the hyperparameters name.\n\nThe result is a RandomForestABC object with fields:\n\nreference_table an AbcModelChoiceDataset that corresponds to the reference table of the algorithm, \nclf a random forest classifier (PyObject from scikit-learn),\nsummary_stats_observations are the summary statitics of the observations\nestim_model is the underlying model of the observations inferred with the RF-ABC method.\n\n\n\n\n\n","category":"method"},{"location":"api/model.html#Model-test-related-methods","page":"Model","title":"Model test related methods","text":"","category":"section"},{"location":"api/model.html","page":"Model","title":"Model","text":"Modules = [MarkovProcesses]\nPages   = [\"src/model.jl\"]","category":"page"},{"location":"api/model.html#MarkovProcesses.change_simulation_stop_criteria-Tuple{ContinuousTimeModel, Symbol}","page":"Model","title":"MarkovProcesses.change_simulation_stop_criteria","text":"change_simulation_stop_criteria(m::ContinuousTimeModel, isabsorbing_func::Symbol)\n\nChange the simulation of the model m by adding a stop criteria based on the function named isabsorbing_func::Symbol. isabsorbing_func must have the type signature isabsorbing_func(p::Vector{Float64}, x::Vector{Int}) where p is the parameter vector of the model and x a state (not an observed state) of the model.\n\n\n\n\n\n","category":"method"},{"location":"api/model.html#MarkovProcesses.distribute_mean_value_lha-Tuple{SynchronizedModel, Symbol, Int64}","page":"Model","title":"MarkovProcesses.distribute_mean_value_lha","text":"distribute_mean_value_lha(sm::SynchronizedModel, sym_var::Symbol, nbr_stim::Int)\n\nDistribute over workers the computation of the mean value  of an LHA over nbr_sim simulations of the model.\n\n\n\n\n\n","category":"method"},{"location":"api/model.html#MarkovProcesses.draw!-Tuple{AbstractMatrix{Float64}, ParametricModel}","page":"Model","title":"MarkovProcesses.draw!","text":"draw!(mat_p, pm)\n\nDraw size(mat_p)[2] (number of columns of mat_p) parameters from the prior distribution  defined in pm and stores it in mat_p.\n\n\n\n\n\n","category":"method"},{"location":"api/model.html#MarkovProcesses.draw!-Tuple{AbstractVector{Float64}, ParametricModel}","page":"Model","title":"MarkovProcesses.draw!","text":"draw!(vec_p, pm)\n\nDraw a parameter from the prior distribution defined in pm and stores it in vec_p.\n\n\n\n\n\n","category":"method"},{"location":"api/model.html#MarkovProcesses.draw_model!-Tuple{ParametricModel}","page":"Model","title":"MarkovProcesses.draw_model!","text":"draw_model!(pm::ParametricModel)\n\nDraw a parameter from the prior disitribution defined in pm::ParametricModel and save it in the model contained in pm.\n\n\n\n\n\n","category":"method"},{"location":"api/model.html#MarkovProcesses.prior_pdf!-Tuple{AbstractVector{Float64}, ParametricModel, AbstractMatrix{Float64}}","page":"Model","title":"MarkovProcesses.prior_pdf!","text":"prior_pdf(res_pdf, mat_p, pm)\n\nComputes the density for each column of mat_p of the prior distribution defined in pm. Stores it in res_pdf. (length(vec_res) == size(mat_p)[2])\n\n\n\n\n\n","category":"method"},{"location":"api/model.html#MarkovProcesses.prior_pdf-Tuple{ParametricModel, AbstractVector{Float64}}","page":"Model","title":"MarkovProcesses.prior_pdf","text":"prior_pdf(p_prior, pm)\n\nComputes the density at p_prior of the prior distribution defined in pm.\n\n\n\n\n\n","category":"method"},{"location":"api/model.html#MarkovProcesses.probability_var_value_lha-Tuple{SynchronizedModel, Int64}","page":"Model","title":"MarkovProcesses.probability_var_value_lha","text":"distribute_var_value_lha(sm::SynchronizedModel, nbr_sim::Int, value = 0, sym_var = :d)\n\nCompute the probability that the variable sym_var is equal to value of an LHA over nbr_sim simulations of the model.\n\n\n\n\n\n","category":"method"},{"location":"api/model.html#MarkovProcesses.simulate-Tuple{ParametricModel, AbstractVector{Float64}}","page":"Model","title":"MarkovProcesses.simulate","text":"simulate(pm::ParametricModel, p_prior::AbstractVector{Float64})\n\nSimulates the model contained in the parametric model pm with the p_prior parameters. It simulates the model by taking the parameters contained in get_proba_model(pm).p and replace the 1D parameters pm.params with p_prior.\n\n\n\n\n\n","category":"method"},{"location":"api/model.html#MarkovProcesses.volatile_simulate-Tuple{ParametricModel, AbstractVector{Float64}}","page":"Model","title":"MarkovProcesses.volatile_simulate","text":"volatile_simulate(pm::ParametricModel, p_prior::AbstractVector{Float64})\n\nA volatile version of simulate(pm::ParametricModel, p_prior::AbstractVector{Float64}). The model in pm should be of type SynchronizedModel (typeof(pm.m) <: SynchronizedModel). It returns S::StateLHA, not a trajectory.\n\n\n\n\n\n","category":"method"},{"location":"api/model.html#MarkovProcesses.volatile_simulate-Tuple{SynchronizedModel}","page":"Model","title":"MarkovProcesses.volatile_simulate","text":"volatile_simulate(sm::SynchronizedModel; p, verbose)\n\nSimulates a model synchronized with an automaton but does not store the values of the simulation  in order to improve performance. It returns the last state of the simulation S::StateLHA not a trajectory σ::SynchronizedTrajectory.\n\n\n\n\n\n","category":"method"},{"location":"create_model.html#Create-a-model","page":"Create a model","title":"Create a model","text":"","category":"section"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"The package offers different ways to create models based on CRNs.","category":"page"},{"location":"create_model.html#Load-a-pre-written-model","page":"Create a model","title":"Load a pre-written model","text":"","category":"section"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"A bunch of models are already writtne within the package. If str_model::String is the name of an implemented model, then load_model(str_model) creates a variable with name str_model.","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"load_model(\"poisson\")","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"Available models are listed below.","category":"page"},{"location":"create_model.html#Define-a-Chemical-Reaction-Network","page":"Create a model","title":"Define a Chemical Reaction Network","text":"","category":"section"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"Let's consider the Chemical Reaction Network of the SIR model:","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"`` Infection: S + I \\xrightarrow{ki} 2I \\\nRecovery: I \\xrightarrow{kr} R ``","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"The macro @network_model creates easily a CTMC stored in a ContinuousTimeModel variable based on this formalism.","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"julia> easy_sir = @network_model begin\n       Infection: (S + I => 2I, ki*I*S)\n       Recovery: (I => R, kr*I)\n       end \"My awesome SIR\"\nMy_awesome_SIRModel <: ContinuousTimeModel model\n- variables :\n* I (index = 2 in state space)\n* R (index = 3 in state space)\n* S (index = 1 in state space)\n- parameters :\n* ki (index = 1 in parameter space)\n* kr (index = 2 in parameter space)\n- transitions : Infection,Recovery\n- observed variables :\n* S (index = 1 in observed state space, index = 1 in state space)\n* I (index = 2 in observed state space, index = 2 in state space)\n* R (index = 3 in observed state space, index = 3 in state space)\np = [0.0, 0.0]\nx0 = [0, 0, 0]\nt0 = 0.0\ntime bound = Inf","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"In the first reaction, ki*I*S is the reaction rate of the reaction Infection. This model is almost ready to use, we have to set the initial state and the parameters.","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"julia> set_param!(easy_sir, [0.0012, 0.05])\n       set_x0!(easy_sir, [95, 5, 0])\n       σ = simulate(easy_sir)\n       load_plots()\n       plot(σ)","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"(Image: Plot of a simulated SIR trajectory)","category":"page"},{"location":"create_model.html#Manually-(advanced)","page":"Create a model","title":"Manually (advanced)","text":"","category":"section"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"This page is intented to advanced uses of the package, in order to use","category":"page"},{"location":"create_model.html#Based-on-an-existing-model","page":"Create a model","title":"Based on an existing model","text":"","category":"section"},{"location":"create_model.html#From-scratch","page":"Create a model","title":"From scratch","text":"","category":"section"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"When the above cases don't fit your application one can create manually a ContinuousTimeModel. Let's take a look about the signature of the constructor method:","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"function ContinuousTimeModel(dim_state::Int, dim_params::Int, map_var_idx::Dict{VariableModel,Int}, \n                             map_param_idx::Dict{ParameterModel,Int}, transitions::Vector{<:Transition},\n                             p::Vector{Float64}, x0::Vector{Int}, t0::Float64, \n                             f!::Function, isabsorbing::Function; kwargs)","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"Let's construct an SIR model manually. First, one has to specify the dimensions of the state space and the parameter space.","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"dim_state_sir, dim_params_sir = 3, 2","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"map_var_idx is a dictionary that maps each model variable (represented by a Symbol) to an index in the state space.","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"map_var_idx_sir = Dict(:S => 1, :I => 2, :R => 3)","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"map_var_params is the equivalent of map_var_idx for parameters.","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"map_params_idx_sir = Dict(:ki => 1, :kr => 2)","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"transitions are the transitions/reactions of the model (vector of Symbol), p, x0 and t0 are respectively the parameters, the initial state and initial time of the model.","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"transitions_sir = [:Infection, :Recovery]\np_sir = [0.0012, 0.05]\nx0_sir = [95, 5, 0]\nt0_sir = 0.0","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"The two last arguments are functions, the first one, called f! must have the signature:","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"function f!(xnplus1::Vector{Int}, ptr_t::Vector{Float64}, ptr_tr::Vector{Transition},\n            xn::Vector{Int}, tn::Float64, p::Vector{Float64})","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"It should return nothing. xnplus1, ptr_t and ptr_tr are vectors where the next values are stored. ptr_t is of length 1 and stores the next time value (ptr_t[1] = tn + delta_t) whereas ptr_tr stores the name of the next transition/reaction (ptr_tr[1] = :Infection for example). This function is implemented in the package as:","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"@everywhere function sir_f!(xnplus1::Vector{Int}, l_t::Vector{Float64}, l_tr::Vector{Transition},\n                             xn::Vector{Int}, tn::Float64, p::Vector{Float64})\n    @inbounds a1 = p[1] * xn[1] * xn[2]\n    @inbounds a2 = p[2] * xn[2]\n    l_a = (a1, a2)\n    asum = sum(l_a)\n    if asum == 0.0\n        copyto!(xnplus1, xn)\n        return nothing\n    end\n    nu_1 = (-1, 1, 0)\n    nu_2 = (0, -1, 1)\n    l_nu = (nu_1, nu_2)\n    l_str_R = (:Infection, :Recovery)\n\n    u1 = rand()\n    u2 = rand()\n    tau = - log(u1) / asum\n    b_inf = 0.0\n    b_sup = a1\n    reaction = 0\n    for i = 1:2 \n        if b_inf < asum*u2 < b_sup\n            reaction = i\n            break\n        end\n        @inbounds b_inf += l_a[i]\n        @inbounds b_sup += l_a[i+1]\n    end\n \n    nu = l_nu[reaction]\n    for i = 1:3\n        @inbounds xnplus1[i] = xn[i]+nu[i]\n    end\n    @inbounds l_t[1] = tn + tau\n    @inbounds l_tr[1] = l_str_R[reaction]\nend","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"i The second function called isaborbing must have the signature:","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"isabsorbing(p::Vector{Float64}, xn::Vector{Int})","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"This function checks if the state xn is an absorbing state according to the model parametrised by p. It has to return true or false.","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"For a CTMC, a state is an absorbing state if the total exit rate is zero. In the case of the SIR model;","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"@everywhere sir_isabsorbing(p::Vector{Float64}, xn::Vector{Int}) = (p[1]*xn[1]*xn[2] + p[2]*xn[2]) === 0.0","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"Finally one sets the observed variables and the model can be created. The following lines creates a new type TryhardSIRModel <: ContinuousTimeModel, and the core of simulation.","category":"page"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"g_sir = [:I]\n\n# Generates simulate method for the new model\n@everywhere @eval $(MarkovProcesses.generate_code_model_type_def(:TryhardSIRModel))\n@everywhere @eval $(MarkovProcesses.generate_code_model_type_constructor(:TryhardSIRModel))\n@everywhere @eval $(MarkovProcesses.generate_code_simulation(:TryhardSIRModel, :sir_f!, :sir_isabsorbing))\n\ntryhard_sir = TryhardSIRModel(dim_state_sir, dim_params_sir, \n                              map_var_idx_sir, map_params_idx_sir, \n                              transitions_sir, p_sir, x0_sir, t0_sir, \n                              :sir_f!, :sir_isabsorbing; g = g_sir)\nσ = simulate(tryhard_sir)","category":"page"},{"location":"create_model.html#List-of-pre-written-models","page":"Create a model","title":"List of pre-written models","text":"","category":"section"},{"location":"create_model.html","page":"Create a model","title":"Create a model","text":"load_model(\"poisson\"): Poisson process\nload_model(\"ER\"): Michaelis-Menten kinetics (Enzymatic Reactions)\nload_model(\"SIR\"): Susceptible-Infected-Removed\nload_model(\"doping_3way_oscillator\"): Three-way oscillator with doping reactions\nload_model(\"repressilator\"): A repressilator model","category":"page"},{"location":"starting.html#Getting-Started","page":"Getting Started","title":"Getting Started","text":"","category":"section"},{"location":"starting.html#Installation","page":"Getting Started","title":"Installation","text":"","category":"section"},{"location":"starting.html","page":"Getting Started","title":"Getting Started","text":"Launch Julia's REPL (for example by entering julia in your shell)\nEnter Pkg's REPL by typing ]\nEnter\npkg> add https://gitlab-research.centralesupelec.fr/2017bentrioum/markovprocesses.jl/","category":"page"},{"location":"starting.html#Context-Mathematical-framework","page":"Getting Started","title":"Context - Mathematical framework","text":"","category":"section"},{"location":"starting.html","page":"Getting Started","title":"Getting Started","text":"In this package, we are focused on Continuous-Time Markov Chains (CTMC, also called Markov jump processes), that can be described by Chemical Reaction Networks. The future state only depends on the current state. It is defined by two properties:","category":"page"},{"location":"starting.html","page":"Getting Started","title":"Getting Started","text":"forall t s in mathbbR_geq 0 mathbbP(S_t  S_v v in 0s) = mathbbP(S_t S_s) (Memoryless/Markov property)\nforall tv in mathbbR_geq 0 t  v mathbbP(S_t  S_v) = mathbbP(S_t-v  S_0) (Time-homogeneity).","category":"page"},{"location":"starting.html","page":"Getting Started","title":"Getting Started","text":"A Chemical Reaction Network (CRN) is a formalism that describes biological phenomena. An example is the Susceptible-Infected-Removed model (SIR):","category":"page"},{"location":"starting.html","page":"Getting Started","title":"Getting Started","text":"R_1 S + I xrightarrowk_i 2I R_2 I xrightarrowk_r R","category":"page"},{"location":"starting.html","page":"Getting Started","title":"Getting Started","text":"This CRN has two reactions that models two phenomena: infection (R_1) or immunisation (R_2). Each reaction is parametrized by a kinetic rate (k_i or k_r). The stochastic dynamics of a CRN are described by CTMCs.","category":"page"},{"location":"starting.html#Models","page":"Getting Started","title":"Models","text":"","category":"section"},{"location":"starting.html","page":"Getting Started","title":"Getting Started","text":"In the package, models are objects and their types all derived from the abstract type Model. Let's load the SIR model, which is pre-written within the package.","category":"page"},{"location":"starting.html","page":"Getting Started","title":"Getting Started","text":"julia> load_model(\"SIR\")\ncreate_SIR (generic function with 1 method)\n\njulia> println(SIR)\nSIRModel <: ContinuousTimeModel model\n- variables :\n* I (index = 2 in state space)\n* R (index = 3 in state space)\n* S (index = 1 in state space)\n- parameters :\n* ki (index = 1 in parameter space)\n* kr (index = 2 in parameter space)\n- transitions : R1,R2\n- observed variables :\n* I (index = 1 in observed state space, index = 2 in state space)\np = [0.0012, 0.05]\nx0 = [95, 5, 0]\nt0 = 0.0\ntime bound = Inf","category":"page"},{"location":"starting.html","page":"Getting Started","title":"Getting Started","text":"load_model has created a variable called SIR, which contains all the information for simulating the SIR model described above. It also contains a parameter vector and an initial point.","category":"page"},{"location":"starting.html","page":"Getting Started","title":"Getting Started","text":"julia> @show SIR.p \n       @show SIR.x0\nSIR.p = [0.0012, 0.05]\nSIR.x0 = [95, 5, 0]","category":"page"},{"location":"starting.html","page":"Getting Started","title":"Getting Started","text":"You can change the parameters or the initial state with the functions set_param! and set_x0!.","category":"page"},{"location":"starting.html","page":"Getting Started","title":"Getting Started","text":"julia> set_param!(SIR, :ki, 0.015)\njulia> @show SIR.p\nSIR.p = [0.015, 0.05]\n\njulia> set_param!(SIR, [0.02, 0.07])\njulia> @show SIR.p\nSIR.p = [0.02, 0.07]\n\njulia> set_x0!(SIR, :S, 93)\njulia> @show SIR.x0\nSIR.x0 = [93, 5, 0]","category":"page"},{"location":"starting.html#Trajectories","page":"Getting Started","title":"Trajectories","text":"","category":"section"},{"location":"starting.html","page":"Getting Started","title":"Getting Started","text":"The simulation of the model is done by the function simulate.","category":"page"},{"location":"starting.html","page":"Getting Started","title":"Getting Started","text":"julia> σ = simulate(SIR)","category":"page"},{"location":"starting.html","page":"Getting Started","title":"Getting Started","text":"simulate returns a trajectory, which type is derived from AbstractTrajectory. It can be either an object of type Trajectory for models ::ContinuousTimeModel or SynchronizedTrajectory for models that includes an automaton (but this is the subject of another section). It is easy to access the values of a trajectory.","category":"page"},{"location":"starting.html","page":"Getting Started","title":"Getting Started","text":"julia> @show σ[3] # the third state of the trajectory\n       @show length_states(σ) # number of states\n       @show σ[:I, 4] # Fourth value of the variable I\n       @show σ.I[4] # Fourth value of the variable I\n       @show get_state_from_time(σ, 2.3)\n\nσ[3] = [7]\nlength_states(σ) = 196\nσ[:I, 4] = 8\nσ.I[4] = 8\nget_state_from_time(σ, 2.3) = [79]","category":"page"},{"location":"starting.html","page":"Getting Started","title":"Getting Started","text":"The SIR object includes an observation model symbolized by the vector SIR.g. Even if the variables of the model are [:S, :I, :R], only I will be observed.","category":"page"},{"location":"starting.html","page":"Getting Started","title":"Getting Started","text":"julia> @show SIR.map_var_idx\n       @show SIR.g\n       @show size(σ.values), length(σ[:I]) # Only one column which corresponds to the I variable\nSIR.map_var_idx = Dict(:I => 2,:R => 3,:S => 1)\nSIR.g = [:I]\n(size(σ.values), length(σ[:I])) = ((1,), 196)","category":"page"},{"location":"starting.html","page":"Getting Started","title":"Getting Started","text":"The SIR model is by default unbounded, i.e. each trajectory is simulated until it reaches an absorbing state.","category":"page"},{"location":"starting.html","page":"Getting Started","title":"Getting Started","text":"julia> @show isbounded(SIR)\n       @show isbounded(σ)\nisbounded(SIR) = false\nisbounded(σ) = false","category":"page"},{"location":"starting.html","page":"Getting Started","title":"Getting Started","text":"We can bound the SIR's trajectories until time 120 by running set_time_bound!(SIR, 120.0).","category":"page"},{"location":"index.html","page":"Home","title":"Home","text":"CurrentModule = MarkovProcesses","category":"page"},{"location":"index.html#MarkovProcesses.jl","page":"Home","title":"MarkovProcesses.jl","text":"","category":"section"},{"location":"index.html","page":"Home","title":"Home","text":"A package for simulation, verification and parameter estimation of Chemical Reaction Networks.","category":"page"},{"location":"index.html#Package-features","page":"Home","title":"Package features","text":"","category":"section"},{"location":"index.html","page":"Home","title":"Home","text":"A core of simulation for Continuous-Time Markov Chains (CTMC) defined by Chemical Reaction Networks (CRN),\nA simple interface for Biochemical Networks / Stochastic Petri Nets,\nSynchronized simulation with Linear Hybrid Automata,\nApproximate Bayesian Computation, a likelihood-free inference method,\nAutomaton-ABC: a statistical method for verification of parametric CTMCs.","category":"page"},{"location":"api/plots.html#Plots-related-methods","page":"Plots","title":"Plots related methods","text":"","category":"section"},{"location":"api/plots.html","page":"Plots","title":"Plots","text":"Modules = [MarkovProcesses]\nPages   = [\"src/plots.jl\"]","category":"page"}]
 }
diff --git a/dev/starting.html b/dev/starting.html
index 391bf8d..7c2a8e5 100644
--- a/dev/starting.html
+++ b/dev/starting.html
@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Getting Started · MarkovProcesses.jl</title><script data-outdated-warner src="assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.044/juliamono.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.11/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="assets/documenter.js"></script><script src="siteinfo.js"></script><script src="../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="index.html"><img src="assets/logo.png" alt="MarkovProcesses.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit"><a href="index.html">MarkovProcesses.jl</a></span></div><form class="docs-search" action="search.html"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="index.html">Home</a></li><li class="is-active"><a class="tocitem" href="starting.html">Getting Started</a><ul class="internal"><li><a class="tocitem" href="#Installation"><span>Installation</span></a></li><li><a class="tocitem" href="#Context-Mathematical-framework"><span>Context - Mathematical framework</span></a></li><li><a class="tocitem" href="#Models"><span>Models</span></a></li><li><a class="tocitem" href="#Trajectories"><span>Trajectories</span></a></li></ul></li><li><a class="tocitem" href="create_model.html">Create a model</a></li><li><span class="tocitem">API</span><ul><li><a class="tocitem" href="api/model.html">Model</a></li><li><a class="tocitem" href="api/trajectory.html">Trajectory</a></li><li><a class="tocitem" href="api/abc.html">Approximate Bayesian Computation</a></li><li><a class="tocitem" href="api/plots.html">Plots</a></li></ul></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href="starting.html">Getting Started</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href="starting.html">Getting Started</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com//blob/master/docs/src/starting.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Getting-Started"><a class="docs-heading-anchor" href="#Getting-Started">Getting Started</a><a id="Getting-Started-1"></a><a class="docs-heading-anchor-permalink" href="#Getting-Started" title="Permalink"></a></h1><h2 id="Installation"><a class="docs-heading-anchor" href="#Installation">Installation</a><a id="Installation-1"></a><a class="docs-heading-anchor-permalink" href="#Installation" title="Permalink"></a></h2><ol><li>Launch Julia&#39;s REPL (for example by entering julia in your shell)</li><li>Enter Pkg&#39;s REPL by typing <code>]</code></li><li>Enter<pre><code class="language-julia hljs">pkg&gt; add https://gitlab-research.centralesupelec.fr/2017bentrioum/markovprocesses.jl/</code></pre></li></ol><h2 id="Context-Mathematical-framework"><a class="docs-heading-anchor" href="#Context-Mathematical-framework">Context - Mathematical framework</a><a id="Context-Mathematical-framework-1"></a><a class="docs-heading-anchor-permalink" href="#Context-Mathematical-framework" title="Permalink"></a></h2><p>In this package, we are focused on Continuous-Time Markov Chains (CTMC, also called Markov jump processes), that can be described by Chemical Reaction Networks. The future state only depends on the current state. It is defined by two properties:</p><ul><li><span>$\forall t, s \in \mathbb{R}_{\geq 0}, \mathbb{P}(S_t | S_v, v \in [0,s]) = \mathbb{P}(S_t| S_s)$</span> (Memoryless/Markov property)</li><li><span>$\forall t,v \in \mathbb{R}_{\geq 0}, t &gt; v, \mathbb{P}(S_t | S_v) = \mathbb{P}(S_{t-v} | S_0)$</span> (Time-homogeneity).</li></ul><p>A Chemical Reaction Network (CRN) is a formalism that describes biological phenomena. An example is the Susceptible-Infected-Removed model (SIR):</p><p><span>$R_1: S + I \xrightarrow{k_i} 2I$</span> <span>$R_2: I \xrightarrow{k_r} R$</span></p><p>This CRN has two reactions that models two phenomena: infection (<span>$R_1$</span>) or immunisation (<span>$R_2$</span>). Each reaction is parametrized by a kinetic rate (<span>$k_i$</span> or <span>$k_r$</span>). The stochastic dynamics of a CRN are described by CTMCs.</p><h2 id="Models"><a class="docs-heading-anchor" href="#Models">Models</a><a id="Models-1"></a><a class="docs-heading-anchor-permalink" href="#Models" title="Permalink"></a></h2><p>In the package, models are objects and their types all derived from the abstract type <code>Model</code>. Let&#39;s load the SIR model, which is pre-written within the package.</p><pre><code class="language-julia hljs">julia&gt; load_model(&quot;SIR&quot;)
+<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Getting Started · MarkovProcesses.jl</title><script data-outdated-warner src="assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.045/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.24/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="assets/documenter.js"></script><script src="siteinfo.js"></script><script src="../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="index.html"><img src="assets/logo.png" alt="MarkovProcesses.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit"><a href="index.html">MarkovProcesses.jl</a></span></div><form class="docs-search" action="search.html"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="index.html">Home</a></li><li class="is-active"><a class="tocitem" href="starting.html">Getting Started</a><ul class="internal"><li><a class="tocitem" href="#Installation"><span>Installation</span></a></li><li><a class="tocitem" href="#Context-Mathematical-framework"><span>Context - Mathematical framework</span></a></li><li><a class="tocitem" href="#Models"><span>Models</span></a></li><li><a class="tocitem" href="#Trajectories"><span>Trajectories</span></a></li></ul></li><li><a class="tocitem" href="create_model.html">Create a model</a></li><li><span class="tocitem">API</span><ul><li><a class="tocitem" href="api/model.html">Model</a></li><li><a class="tocitem" href="api/trajectory.html">Trajectory</a></li><li><a class="tocitem" href="api/abc.html">Approximate Bayesian Computation</a></li><li><a class="tocitem" href="api/plots.html">Plots</a></li></ul></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href="starting.html">Getting Started</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href="starting.html">Getting Started</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com//blob/master/docs/src/starting.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Getting-Started"><a class="docs-heading-anchor" href="#Getting-Started">Getting Started</a><a id="Getting-Started-1"></a><a class="docs-heading-anchor-permalink" href="#Getting-Started" title="Permalink"></a></h1><h2 id="Installation"><a class="docs-heading-anchor" href="#Installation">Installation</a><a id="Installation-1"></a><a class="docs-heading-anchor-permalink" href="#Installation" title="Permalink"></a></h2><ol><li>Launch Julia&#39;s REPL (for example by entering julia in your shell)</li><li>Enter Pkg&#39;s REPL by typing <code>]</code></li><li>Enter<pre><code class="language-julia hljs">pkg&gt; add https://gitlab-research.centralesupelec.fr/2017bentrioum/markovprocesses.jl/</code></pre></li></ol><h2 id="Context-Mathematical-framework"><a class="docs-heading-anchor" href="#Context-Mathematical-framework">Context - Mathematical framework</a><a id="Context-Mathematical-framework-1"></a><a class="docs-heading-anchor-permalink" href="#Context-Mathematical-framework" title="Permalink"></a></h2><p>In this package, we are focused on Continuous-Time Markov Chains (CTMC, also called Markov jump processes), that can be described by Chemical Reaction Networks. The future state only depends on the current state. It is defined by two properties:</p><ul><li><span>$\forall t, s \in \mathbb{R}_{\geq 0}, \mathbb{P}(S_t | S_v, v \in [0,s]) = \mathbb{P}(S_t| S_s)$</span> (Memoryless/Markov property)</li><li><span>$\forall t,v \in \mathbb{R}_{\geq 0}, t &gt; v, \mathbb{P}(S_t | S_v) = \mathbb{P}(S_{t-v} | S_0)$</span> (Time-homogeneity).</li></ul><p>A Chemical Reaction Network (CRN) is a formalism that describes biological phenomena. An example is the Susceptible-Infected-Removed model (SIR):</p><p><span>$R_1: S + I \xrightarrow{k_i} 2I$</span> <span>$R_2: I \xrightarrow{k_r} R$</span></p><p>This CRN has two reactions that models two phenomena: infection (<span>$R_1$</span>) or immunisation (<span>$R_2$</span>). Each reaction is parametrized by a kinetic rate (<span>$k_i$</span> or <span>$k_r$</span>). The stochastic dynamics of a CRN are described by CTMCs.</p><h2 id="Models"><a class="docs-heading-anchor" href="#Models">Models</a><a id="Models-1"></a><a class="docs-heading-anchor-permalink" href="#Models" title="Permalink"></a></h2><p>In the package, models are objects and their types all derived from the abstract type <code>Model</code>. Let&#39;s load the SIR model, which is pre-written within the package.</p><pre><code class="language-julia hljs">julia&gt; load_model(&quot;SIR&quot;)
 create_SIR (generic function with 1 method)
 
 julia&gt; println(SIR)
@@ -48,4 +48,4 @@ SIR.g = [:I]
 (size(σ.values), length(σ[:I])) = ((1,), 196)</code></pre><p>The SIR model is by default unbounded, i.e. each trajectory is simulated until it reaches an absorbing state.</p><pre><code class="language-julia hljs">julia&gt; @show isbounded(SIR)
        @show isbounded(σ)
 isbounded(SIR) = false
-isbounded(σ) = false</code></pre><p>We can bound the SIR&#39;s trajectories until time 120 by running <code>set_time_bound!(SIR, 120.0)</code>.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="index.html">« Home</a><a class="docs-footer-nextpage" href="create_model.html">Create a model »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.17 on <span class="colophon-date" title="Tuesday 17 May 2022 07:23">Tuesday 17 May 2022</span>. Using Julia version 1.6.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
+isbounded(σ) = false</code></pre><p>We can bound the SIR&#39;s trajectories until time 120 by running <code>set_time_bound!(SIR, 120.0)</code>.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="index.html">« Home</a><a class="docs-footer-nextpage" href="create_model.html">Create a model »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.24 on <span class="colophon-date" title="Wednesday 8 March 2023 15:42">Wednesday 8 March 2023</span>. Using Julia version 1.7.2.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
-- 
GitLab