causalbase#

Source | Issues | Changelog | Citing

causalbase learns the structure of Bayesian networks from data. It has seven estimators, all following scikit-learn’s conventions:

Estimator

Data

Returns

GES

Discrete (BDeu, BIC) or continuous (Gaussian BIC, BGe)

The equivalence class, by greedy equivalence search

XGES

The same

The equivalence class, by a search that also deletes and reverses edges

OrderSearch

The same

A DAG, by iterated local search over variable orders

FLOP

The same

A DAG, by FLOP’s search over orders

HillClimbing

The same

A DAG, by hill climbing or tabu search

ExactSearch

The same

The DAG of highest score, or the best one under a parent limit

RCD

Continuous, linear with non-Gaussian noise

A causal order and its coefficients, from higher-order cumulants

from causalbase import GES
from causalbase.datasets import load_alarm

model = GES().fit(load_alarm().data)
model.adjacency_

Learning across sites that cannot share their data is the job of fedcausal, which is built on causalbase.

Getting started

Installation and a first structure, measured against the true network.

Quickstart
Algorithms

What each search does and what its options change.

Algorithms and options
API reference

Parameters, attributes and methods of every class and function.

API reference
Examples

Scripts that run on the bundled networks.

Examples