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.82k stars 714 forks source link

DML with CasualForestIV? #548

Closed EgorKraevTransferwise closed 2 years ago

EgorKraevTransferwise commented 2 years ago

Hi!

this library is truly awesome!

I would like to use CausalForestIV in a similar manner to how CausalForest is used in CausalForestDML, that is I would use eg FLAML to correct for the impact of known confounders, and CausalForestIV to then use instruments and account for effect modifiers. Is that fundamentally a reasonable idea, and if so, how would I best approach it? There doesn't seem to be a CausalForestIVDML class, is there a fundamental theoretical reason for that or is it just that no one got around to writing one?

Thanks a lot for your help!

vsyrgkanis commented 2 years ago

I would try the ForestDRIV class: see here for usage https://github.com/microsoft/EconML/blob/deb346803357b090325df6d1cad53f3f699f5763/notebooks/OrthoIV%20and%20DRIV%20Examples.ipynb

what you describe is closer to an OrthoIV estimator with a forest final stage. But due to deprioritization we have not implemented that. Should be easy to implement if you create a child class of orthoiv and replacr tbe _gen_model_final method to generate a IVforest.

however for IV wirh a forest based heterogeneity and in a doubly robust (orthogonal) manner, we already have ForestDRIV which does exactly that.

EgorKraevTransferwise commented 2 years ago

Thanks a lot! Will give it a go