Accelerated, accurate, agentic causal discovery.
Accelerated
The fastest causal discovery package.
Fit time
PC400 variables
GES200 variables
BOSS40 variables
DirectLiNGAM200 variables
PCMCI160 variables
GIN12 variables
ANM8,000 rows
Why Andrey is fast
It does many things at once, never computes twice, skips what can't matter, and uses the hardware you have.
Accurate
Just as accurate as other popular packages.
Errors against the true graph
PC400 variables
GES200 variables
BOSS40 variables
DirectLiNGAM200 variables
PCMCI160 variables
GIN12 variables
ANM8,000 rows
Tested against the true graphs
Every release is tested against the graphs that generated the data.
Agentic
A command line that never prompts and answers in JSON, so an agent can run it alone.
All-in-one
50 supported methods for every kind of data, and five kinds of causal graph.
Package comparison
Scroll to see all packages.
Andrey causal-learn Tetrad pcalg bnlearn Coverage Distinct methods 46 21 21 8 10 Permutation invariance Yes No Partly: PC and FCI follow the variables' names; BOSS, GRaSP, and GIN changed with the column order. No No Speed CPU parallelization Yes Partly: Several CPU cores for RLCD and the FastKCI test only. Partly: Several threads for FGES, BOSS, GFCI, and PC's adjacency search. Partly: Several cores for the skeleton step of its stable.fast method only. Partly: A cluster for its constraint-based methods and DirectLiNGAM only. GPU acceleration Yes Partly: CALM only. No No No Open benchmarks Yes No No No No Agentic JSON command line Yes No Partly: causal-cmd writes the graph, and only the graph, to a JSON file. No No Schema for every method Yes No Partly: Typed parameter defaults and bounds, in an HTML manual. No No Agent skill Yes No Partly: py-tetrad's development branch has a skill and guides; no release has them. No No Methods by kind of data
Family Continuous Categorical Mixed Missing values Several environments Several datasets Hidden causes Time series Two variables Constraint-based9 supported methodsTests which variables are independent, then removes and orients edges. 9 8 8 7 4 0 3 0 0 Score-based13 supported methodsSearches for the graph that scores best on the data. 13 8 8 4 5 0 0 0 0 Permutation-based6 supported methodsSearches over orderings of the variables and reads the graph from the best. 6 6 6 2 6 0 2 0 0 Functional causal models7 supported methodsUses the shape of the noise or of the effect to direct every edge. 7 0 0 0 0 1 0 0 0 Temporal causal discovery8 supported methodsFinds lagged and same-step effects in time series and panels. 8 3 3 3 0 2 1 8 0 Latent variables4 supported methodsAllows hidden common causes and shows where they may act. 4 0 0 0 0 0 4 0 0 Pairwise direction3 supported methodsDecides which of two variables causes the other. 3 0 0 3 0 0 0 0 3 Five kinds of causal graph
From data to graph
From a table of measurements to its causal graph, in a few lines of Python.
Sachs and colleagues measured 11 proteins and phospholipids in 853 human immune cells. PC finds 8 of the 17 links in the known signaling network, and none outside it.
andrey.viz.draw.import andrey
from andrey.data import load_dataset
df = load_dataset("sachs").data
out = andrey.pc(df)
print(out)pc cpdag | 11 nodes | 8 edges (6 undirected, 2 directed)
raf -- mek
plc -- pip3
pip2 -- pip3
erk -- akt
erk -- pka
akt -- pka
p38 -> pkc
jnk -> pkc
indep_test: fisherz
tie_break: rankDocumentation
Latest post · · Updated Functional causal modelsWhat a functional causal model is, why a curve shows which way an effect runs, and Andrey's methods for it, from LiNGAM and CAM to SCORE, DAS, SkewD, and CPCM.
- Getting startedInstall, then recover your first graph.
- Graph typesWhat a DAG, CPDAG, PAG, or temporal graph claims.
- API referenceEvery method, structure, and command.
- Release cardsTimings, accuracy, limits, and how to rerun them.








