Examples¶

A curated set of Jupyter notebooks that demonstrate the most common tasks in pgmpy - building models, learning from data, inference, and causal analysis.

Defining Bayesian Networks¶

  • Creating Discrete Bayesian Networks
  • Creating Linear Gaussian Bayesian Networks
  • How to define TabularCPD and LinearGaussianCPD
  • Basic Operations on Bayesian Networks

Causal Discovery / Structure Learning¶

  • Structure Learning in Bayesian Networks
  • Learning Tree Structure from Data using the Chow-Liu Algorithm
  • Learning Tree-augmented Naive Bayes (TAN) Structure from Data

Parameter Estimation¶

  • Parameter Learning in Discrete Bayesian Networks
  • Marginal Learning in Discrete Markov Networks
  • Modeling the home & visitor scores

Probabilistic Inference¶

  • Inference in Discrete Bayesian Network
  • Monty Hall Problem

Causal Inference¶

  • Causal Inference Examples
  • Causal Games

Simulations¶

  • Simulating Data From Bayesian Networks

Extending pgmpy¶

  • Extending pgmpy

Logo

Quick search

Navigation

  • Getting Started
  • Examples
    • Defining Bayesian Networks
    • Causal Discovery / Structure Learning
    • Parameter Estimation
    • Probabilistic Inference
    • Causal Inference
    • Simulations
    • Extending pgmpy
  • Supported Models
  • Parameterization
  • Probabilistic Inference
  • Causal Inference
  • Parameter Estimation
  • Causal Discovery / Structure Learning
  • Metrics for Testing Models
  • Reading/Writing to File
  • Plotting Models
  • Tutorial Notebooks

Related Topics

  • Documentation overview
    • Previous: Getting Started
    • Next: Creating Discrete Bayesian Networks
©2025, Ankur Ankan. | Powered by Sphinx 8.2.3 & Alabaster 0.7.16 | Page source