Andrey#
Andrey is a Python package for causal discovery: from observational data, 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 fully supported; macOS and Windows install and run on the CPU, with no guarantee yet.
Install Andrey and learn your first graph.
Notebooks that run one method or task each.
Step through methods and explore results in your browser.
Install, methods, speed, data, and the project.
What changed in each release.
Guides and reference#
Install: the package and optional GPU acceleration.
Get started: learn a causal graph from real data.
Examples: notebooks that run one method or task each.
Demos: methods to step through in your browser.
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.
Release cards: each release’s timings, accuracy, and known limits.
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.