# pgmpy/pgmpy

Python Toolkit for Causal and Probabilistic Reasoning

Repository: https://github.com/pgmpy/pgmpy
Canonical: https://ross.abutalabs.com/products/pgmpy
Homepage: https://pgmpy.org/
Language: Python
License: MIT
License Family: permissive
Topics: python, bayesian-networks, causal-inference, causal-discovery, causal-identification, causal-models, probabilistic-inference, mixed-data, synthetic-data, causal-validation, simulation, causal-effect, causal-prediction, graphical-models, hacktoberfest
Last push: 2026-08-19T13:19:42+00:00

## Health v2 (maintenance only)
Score: 81/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 98, release rhythm 49, longevity 100
- inputs: {"age_days": 4730, "days_push": 14, "days_rel": 125, "gap_med": 196.5, "n_releases_24m": 3}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3318, forks 1148 (observed 2026-08-28T04:07:56.179033+00:00)

## What it is
pgmpy is a Python library for causal and probabilistic reasoning with graphical models such as Bayesian Networks, Dynamic Bayesian Networks, DAGs, and Structural Equation Models. It provides a unified, scikit-learn compatible API covering causal discovery, parameter estimation, probabilistic and causal inference, causal identification, model validation, and data simulation.

## Use cases
- learn causal graph structure from data
- run probabilistic inference on a bayesian network
- estimate causal effects from observational data
- fit conditional probability distributions to a known graph
- simulate synthetic data from a fitted model
- check whether a causal effect is identifiable from a causal graph
- build a probabilistic graphical model in python

## When to choose
- you need causal discovery, identification, or effect estimation in Python
- you want exact or approximate inference over Bayesian Networks
- you want sklearn-compatible estimators that fit into ML pipelines
- you need to simulate observational or interventional data from graphical models

## When to avoid
- you need deep-learning-based probabilistic modeling or neural networks
- you need a GUI for building Bayesian networks
- you only need general-purpose graph algorithms without probabilistic semantics

## Facets
- artifact type: library
- maturity: stable
- function: machine-learning, data-science, simulation, data-generation, sdk
- domain: machine-learning, data-science
- platform: python, cross-platform
- tags: bayesian-networks, causal-inference, causal-discovery, probabilistic-graphical-models, structure-learning, parameter-estimation, scikit-learn-compatible, graphical-models, algorithms, statistics

## Member repositories
- pgmpy/pgmpy (main) score 81

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:56.179033+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:42:03.481556+00:00, confidence not recorded.
  - readme: https://github.com/pgmpy/pgmpy (fetched 2026-08-28T04:07:56.179033+00:00, sha 1bc36778b3ae)
  - homepage: https://pgmpy.org/ (fetched 2026-08-29T09:35:04.687346+00:00, sha 92367549a1d0)
  - site_page: https://pgmpy.org/documentation.html (fetched 2026-08-29T09:35:04.696357+00:00, sha 88550ef1beca)
  - site_page: https://pgmpy.org/started/quickstart.html (fetched 2026-08-29T09:35:04.698138+00:00, sha e81a0e72e3de)
  - registry_pypi: https://pypi.org/pypi/pgmpy/json (fetched 2026-08-29T09:35:04.700270+00:00, sha 43547e910dbd)
- Data as of 2026-08-30T08:39:29.467469+00:00.
