Jorn Mossel - Modeling Extreme Events with PyMC | PyData Global 2023

Learn how to model extreme events like floods and market crashes using PyMC. Covers Bayesian modeling, spatial data analysis, and practical implementation with NYC rainfall data.

Key takeaways
  • PyMC is an open-source Python library for probabilistic programming that simplifies Bayesian modeling of extreme events

  • Extreme value theory helps model rare events in various domains including rainfall, temperature, stock market crashes, and server loads

  • When modeling extreme events, focusing on annual maxima (rather than all data points) allows fitting specific probability distributions more effectively

  • Gaussian processes can incorporate spatial relationships between data points, improving predictions by leveraging information from nearby locations

  • The Bayesian approach automatically provides uncertainty estimates and allows incorporation of prior knowledge, which is particularly valuable for extreme events with limited data

  • Return periods and return levels help quantify how extreme an event is (e.g., “once in 100 years event”)

  • For the specific case study of NYC rainfall, incorporating data from nearby weather stations reduced prediction uncertainty by approximately 50%

  • PyMC’s code implementation is relatively straightforward, requiring only a few lines to define prior distributions and model structure

  • The approach works well with limited data by leveraging information from related observations (e.g., nearby weather stations)

  • Modern climate analysis requires adaptive modeling approaches since historical data may not be appropriate due to changing conditions