py-why / EconML

ALICE (Automated Learning and Intelligence for Causation and Economics) is a Microsoft Research project aimed at applying Artificial Intelligence concepts to economic decision making. One of its goals is to build a toolkit that combines state-of-the-art machine learning techniques with econometrics in order to bring automation to complex causal inference problems. To date, the ALICE Python SDK (econml) implements orthogonal machine learning algorithms such as the double machine learning work of Chernozhukov et al. This toolkit is designed to measure the causal effect of some treatment variable(s) t on an outcome variable y, controlling for a set of features x.
https://www.microsoft.com/en-us/research/project/alice/
Other
3.64k stars 689 forks source link

Individual Treatment Effects #869

Open PrannoyLFC opened 3 months ago

PrannoyLFC commented 3 months ago

Hi @kbattocchi ,

I used the following code to calculate the ATE for my panel data (around ~$18).

dml = DynamicDML(model_y=outcome_model, model_t=treatment_model, cv=2, discrete_treatment=True)

dml.fit(Y=Y, T=T, X=None, W=X, groups=groups)

Is it possible to get individual treatment effects too? Ie how much causal impact the treatment would gave in the outcome variable for each row of my data?

ellpri commented 3 months ago

@PrannoyLFC I think, in order to get the effect for each row, you need to use dml.effect(x_test)Reference