The repo containing the code and experiments for the model described in Hierarchical Bias-Driven Stratification for Interpretable Causal Effect Estimation; accepted to AISTATS 2025.
The code in this reporsitory cotains the version used to obtain the results from the paper.
However, version 0.10.0 of causallib now contains a cleaner, better-tested, and improved version of the proposed model (see BiomedSciAI/causallib#76).
We therefore encourage people using the version existing from causallib if they intend to use the model for their own research.
This can be done by the following:
- Install causallib:
pip install causallib
- Import BICauseTree:
from causallib.contrib.bicause_tree import BICauseTree
- At this point
BICauseTreebehaves like any otherIndividualOutcomeEstimatorin causallib.
This means that, given covaraitesX, treatment assignmenta, and outcomey, one canbic = BICauseTree() # See documentation for parametrization bic.fit(X, a, y) # Fit the causal model based on the tree avg_outcomes = bic.estimate_population_outcome(X, a, y) ind_outcomes = bic.estimate_individual_outcome(X, a, y) # Specifying `y` may be optional depending on what type of `outcome_model` was passed to BICauseTree.