# pgmpy > pgmpy is a Python library for causal inference, probabilistic modeling, Bayesian networks, and directed acyclic graphs. ## Pages ### Home - [Key Features](https://pgmpy.org/index.html): pgmpy documentation for causal discovery, model testing, causal effect estimation, parameter estimation, probabilistic and causal inference, and simulations in Python. ### Getting Started - [Getting Started](https://pgmpy.org/started/index.html): Start using pgmpy with installation instructions, a quickstart workflow with minimal examples for each task, and pgmpy's license. - [Installation](https://pgmpy.org/started/install.html): pgmpy supports Python 3.10 through 3.14. For most users, the base PyPI install is enough: - [Quickstart](https://pgmpy.org/started/quickstart.html): Task-oriented examples to help you get started with pgmpy. ### Guides - [User Guide](https://pgmpy.org/documentation.html): Task-oriented pgmpy guides for causal discovery, parameter estimation, probabilistic inference, simulations, and model building. - [Causal Discovery and Structure Learning](https://pgmpy.org/guides/causal_discovery.html): Learn causal graphs from data using the unified causal discovery APIs in pgmpy. - [Causal Estimation](https://pgmpy.org/guides/causal_estimation.html): Estimate causal effects from graphs and data using pgmpy's causal inference and prediction APIs. - [Causal Identification](https://pgmpy.org/guides/causal_identification.html): Identify adjustment and frontdoor strategies from causal graphs using pgmpy's identification APIs. - [Defining a Custom Model](https://pgmpy.org/guides/custom_model.html): Build custom pgmpy models and attach the right CPD or factor types for your workflow. - [Example Datasets](https://pgmpy.org/guides/datasets.html): Discover and load built-in benchmark datasets using pgmpy's dataset helpers. - [Example Models](https://pgmpy.org/guides/example_models.html): Discover and load built-in example models using pgmpy's example-model helpers. - [Extensibility](https://pgmpy.org/guides/extensibility.html): Extend pgmpy using the repository templates for new datasets, models, metrics, and discovery algorithms. - [Exporting / Importing Models](https://pgmpy.org/guides/io.html): Read and write pgmpy models using the model-level save/load helpers and readwrite classes. - [Metrics](https://pgmpy.org/guides/metrics.html): Evaluate learned graphs and fitted models using pgmpy's metric APIs. - [Parameter Estimation](https://pgmpy.org/guides/parameter_estimation.html): Estimate model parameters from data using pgmpy's unified parameter-estimation APIs. - [Plotting Models](https://pgmpy.org/guides/plotting.html): Visualize pgmpy graphs with Graphviz, daft, or networkx drawing tools. - [Probabilistic Inference](https://pgmpy.org/guides/probabilistic_inference.html): Query fitted pgmpy models using the unified probabilistic inference APIs. - [Simulations](https://pgmpy.org/guides/simulations.html): Generate synthetic data from fitted pgmpy models using the simulation APIs. ### Examples - [Example Notebooks](https://pgmpy.org/examples.html): Example notebooks for pgmpy covering Bayesian networks, structure learning, inference, simulations, and causal analysis. ### API Reference - [API Reference](https://pgmpy.org/reference.html): Public API reference for pgmpy graphs, models, factors, inference, discovery, metrics, datasets, example models, and model import or export. - [Graph Classes](https://pgmpy.org/api/base.html): Core graph representations used by pgmpy models, discovery algorithms, and causal workflows. - [Causal Inference](https://pgmpy.org/api/causal_inference.html): Public classes for identification, interventional queries, and regression-based causal effect estimation. - [Conditional Independence (CI) Tests](https://pgmpy.org/api/ci_test.html): Selector utilities and built-in CI test implementations. - [Datasets and Example Models](https://pgmpy.org/api/data.html): Built-in data and example-model discovery helpers. - [Factors and CPDs](https://pgmpy.org/api/factors.html): Factor, CPD, and factor-container classes used to parameterize pgmpy models. - [Independencies](https://pgmpy.org/api/independencies.html): Classes for representing independence assertions and collections of independencies. - [Inference and Sampling](https://pgmpy.org/api/inference.html): - [Metrics](https://pgmpy.org/api/metrics.html): Metrics for evaluating learned structures, implied independencies, and fitted models. - [Models](https://pgmpy.org/api/models.html): Public model classes for probabilistic, causal, and structural-equation workflows. - [Parameter Estimation](https://pgmpy.org/api/parameter_estimation.html): Estimator classes for fitting model parameters and related marginal representations from data. - [Reading/Writing](https://pgmpy.org/api/readwrite.html): Reader and writer classes for pgmpy-supported interchange formats. - [Causal Discovery and Structure Learning](https://pgmpy.org/api/structure_learning.html): Discovery algorithms and expert-guided workflows for learning graph structure from data. - [Structure Scoring](https://pgmpy.org/api/structure_score.html): Structure score classes used by score-based discovery workflows. - [Undirected and Derived Models](https://pgmpy.org/api/undirected.html): Convenience index for the undirected-model subset of the full :doc:`Models ` reference. ### Project - [Getting Involved](https://pgmpy.org/development.html): Contributing, issue reporting, pull requests, and community channels for the pgmpy project. ## Machine-readable - [Sitemap](https://pgmpy.org/sitemap.xml): XML sitemap for crawlers and site indexing. - [Full page inventory](https://pgmpy.org/llms-full.txt): Expanded list of public pages and summaries.