CSlearn

_images/fig1_demo.png

A CStree on four binary random variables.

cslearn is a Python package for CStree models [1] [2] – a family of graphical causal models for multivariate discrete data that encode context-specific independence (CSI). CStrees generalize DAG models while remaining tractable.

The package implements CSlearn, a three-phase structure-learning algorithm: DAG pre-screening (PC or GRaSP) to restrict candidate parent sets, order MCMC over topological orderings, and an exact staging search under a sparsity bound.

See Installation to get started and the project README for a quick-start example. The paper experiments and precomputed results (~5.9 GB) are on Zenodo.

References