Andrey#

Andrey is a Python package for causal discovery: from data, observational or from experiments, it learns a graph of which variables drive which. It runs PC, FCI, GES, BOSS, GRaSP, the LiNGAM family, and more, each as one function call, on CPU cores or a GPU. It is for people who use these methods on more variables than the usual packages handle quickly, or from a script or a coding agent.

The fastest causal discovery package. The release cards give each measured speedup compared with other packages, including where Andrey is not faster.

uv add andrey-core
pip install andrey-core
import andrey
from andrey.data import load_dataset

df = load_dataset("sachs").data
out = andrey.pc(df)
print(out)

The first call downloads 853 cells’ measurements of 11 proteins, and PC learns a graph over them; Getting started reads the result. Andrey needs Python 3.11 or later. Linux is supported; macOS and Windows install and run on the CPU, with no guarantee yet (Testing).

Get started

Install Andrey and learn your first graph.

Getting started
Examples

Notebooks that run one method or task each, and demos that run in your browser.

Examples
FAQ

Install, methods, speed, data, and the project.

FAQ
Changelog

What changed in each release.

Changelog

Guides and reference#

  • Install: the package and optional GPU acceleration.

  • Get started: learn a causal graph from real data.

  • Concepts: the causal discovery problem stated formally, what each graph claims, and which methods fit which assumptions.

  • Examples: notebooks that run one method or task each, and demos of methods to step through in your browser.

  • Methods: the method to start with for each kind of data, and every method by family, with the data it reads and the graph it returns.

  • API reference: methods, graph structures, and visualization.

  • CLI reference: run methods from the shell.

  • Graph types: DAGs, CPDAGs, PAGs, and temporal graphs, with diagrams.

  • Graph representation: Andrey’s graph model compared with other causal discovery packages.

  • Column order and machines: what each method keeps when you reorder the columns or change machines.

  • Upgrading: what to change in your code for a new release.

  • Contributing: report a problem, set up a development environment, and run the checks before a pull request.

  • Release cards: each release’s timings, accuracy, and known limits.

  • Package comparison: Andrey beside causal-learn, Tetrad, pcalg, and bnlearn, from the data their methods read to what an agent can drive.

  • Standards: what every method must meet, how each requirement is checked, and where the exceptions are recorded.

More#

  • Configuration: the environment variables Andrey reads.

  • Testing: what each release is tested on, and how to run the GPU checks.

  • Brand kit: wordmark, icon, and avatar downloads, with colors and usage guidelines.