Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix header formatting in dynamical_intro #436

Merged
merged 2 commits into from
Dec 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion docs/source/dynamical_intro.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"- [Causal Probabilistic Program](#causal-probabilistic-program)\n",
" - [Model Description](#model-description)\n",
" - [Observation Model](#observation-model)\n",
" - [Generating Synthetic Disease Data using `simulate`](#generating-synthetic-disease-data-using-simulate)\n",
" - [Generating Synthetic Disease Data using simulate](#generating-synthetic-disease-data-using-simulate)\n",
" - [Informal Prior Predictive Check: Visualizing Samples](#informal-prior-predictive-check---visualizing-samples)\n",
"\n",
"- [Probabilistic Inference over Dynamical System Parameters](#probabilistic-inference-over-dynamical-system-parameters)\n",
Expand Down Expand Up @@ -135,8 +135,11 @@
"### Variables\n",
"\n",
"In this example, we will explore the SIR (Susceptible, Infected, Recovered) compartmental model, a fundamental model in epidemiology. Here, the variables of interest are:\n",
"\n",
"- $S(t)$: the number of susceptible individuals at time $t$,\n",
"\n",
"- $I(t)$: the number of infected individuals at time $t$, and\n",
"\n",
"- $R(t)$: the number of recovered individuals at time $t$.\n",
"\n",
"These compartments interact through a set of ordinary differential equations that describe the rate at which individuals move from being susceptible to infected, and from infected to recovered.\n",
Expand All @@ -161,8 +164,11 @@
"### Model Description\n",
"\n",
"The `SIRDynamics` class encapsulates the dynamics of the SIR model. The model is defined by two key parameters: `beta` and `gamma`. These parameters govern the rate of infection and recovery, respectively. The `diff` method in the class defines the differential equations for the Susceptible (`S`), Infected (`I`), and Recovered (`R`) compartments. Specifically:\n",
"\n",
"- The rate of change of `S` is given by `-self.beta * X[\"S\"] * X[\"I\"]`, representing the transition of susceptible individuals to the infected state.\n",
"\n",
"- The rate of change of `I` is `self.beta * X[\"S\"] * X[\"I\"] - self.gamma * X[\"I\"]`, capturing both new infections and recoveries.\n",
"\n",
"- The rate of change of `R` is `self.gamma * X[\"I\"]`, representing the transition from infected to recovered.\n",
"\n",
"These equations encapsulate the causal relationships within the SIR model, where the number of susceptible and infected individuals causally influences the dynamics of the disease spread.\n",
Expand Down
Loading