Skip to content
A Python package for modular causal inference analysis and model evaluations
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Build Status Test Coverage PyPI version Documentation Status

IBM Causal Inference Library

A Python package for computational inference of causal effect.


Causal inference analysis allows estimating of the effect of intervention on some outcome from observational data. It deals with the selection bias that is inherent to such data.

This python package allows creating modular causal inference models that internally utilize machine learning models of choice, and can estimate either individual or average outcome given an intervention. The package also provides the means to evaluate the performance of the machine learning models and their predictions.

The machine learning models must comply with scikit-learn's api and contain fit() and predict() functions. Categorical models must also implement predict_proba().


pip install causallib


In general, the package is imported using the name causallib. For example, use

from sklearn.linear_model import LogisticRegression
from causallib.estimation import IPW 
ipw = IPW(LogisticRegression())

Comprehensive Jupyter Notebooks examples can be found in the examples directory.

You can’t perform that action at this time.