Machine learning based causal inference/uplift in Python
Installation
causeinfer is available for installation via uv (recommended) or pip.
# Using uv (recommended - fast, Rust-based installer):
uv pip install causeinfer
# Or using pip:
pip install causeinfer
# For a development build of the package:
git clone https://github.com/andrewtavis/causeinfer.git
cd causeinfer
# With uv (recommended):
uv sync --all-extras # install all dependencies
source .venv/bin/activate # activate venv (macOS/Linux)
# .venv\Scripts\activate # activate venv (Windows)
# Or with pip:
python -m venv .venv # create virtual environment
source .venv/bin/activate # activate venv (macOS/Linux)
# .venv\Scripts\activate # activate venv (Windows)
pip install -e .
import causeinfer
Contents
- standard_algorithms
- Base Models
BaseModelTransformationModel- Two Model
TwoModel- Interaction Term
InteractionTerm- Binary Class Transformation
BinaryTransformation- Quaternary Class Transformation
QuaternaryTransformation- Reflective Uplift Transformation
ReflectiveUplift- Pessimistic Uplift Transformation
PessimisticUplift
- evaluation
- data
- utils