BayesiaLab Tech Talk: Epidemic Modeling with Bayesian Networks


Compartmental models represent the most common approach for characterizing the development of an epidemic. In an earlier webinar, we introduced a compartmental S-I-R-D model and created a highly-simplified Bayesian network to illustrate the principles. Given its great relevance, we believe the topic warrants a more detailed explanation beyond the initial "toy model."

For the purpose of this BayesiaLab Tech Talk, we present a more comprehensive S-E-I-R-D model. Each letter denotes a compartment (or state) of individuals in a population: 

  • S: number of susceptible
  • E: number of exposed
  • I: number of infected 
  • R: number recovered
  • D: number of dead

Additionally, we further differentiate within the states of exposed and infected to account for contagiousness and disease severity.


In standard models, a set of differential equations describes how individuals move between the compartments/states. In this Tech Talk, we implement the differential equations as probabilistic, temporal relationships between nodes in a Bayesian network.

While we often use fictional values in webinars to emphasize methodology over the subject matter, we take a different approach here: The numerical values and parameters presented in this Tech Talk are derived from current COVID-19 observations in France. As a result, the model attempts to represent the actual pandemic situation in France and forecast the pandemic progression.

3replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • An impressive presentation to say the least, especially the use of multiple DBN's and function optimization to discern more accurate values of infection rates , asymptomatic rates, and days sick including a demonstration of the API.  I would have never thought to improve model performance against Python code in differential equations by changing the time interval step from days to hours which only proves the calculus concepts around "limits" and delta size.  Also, these are not the ML-based models that I typically work on.  These "conceptualizations" show the ability of Bayesian Networks to depict empirical concepts within a broader probabilistic framework.  I am eagerly anticipating leveraging BN’s in more applications like this related to my work.  Thank you, Lionel, and Stefan, for an extremely relevant application of Bayesian modeling that gives considerable attention to the "moving parts" and illuminates the difficulties and challenges with Covid-19 modeling.  As a user of Bayesialab for the last 2-3 years this was an extremely challenging technical presentation (a lot in 1 hour), but surprisingly I was able to follow it.  (I went back a 2nd time for the latter half of the presentation.)   Great job!

    Like 1
  • Attached are the slides I used during the Webinar, the Python code for the SEIRD model, and the Python code that uses the Bayesia Java API for the optimization of 3 parameters.

    Like 1
  • Attached are the networks used during the Webinar

    Like 2
Like3 Follow
  • 4 mths agoLast active
  • 3Replies
  • 448Views
  • 3 Following