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.66k stars 692 forks source link

Orthogonal / Double Machine Learning: model_final last-stage residual regression's intercept as specified by "fit_intercept"? #471

Open ghost opened 3 years ago

ghost commented 3 years ago

Hi! Thanks again for developing this powerful package.

Can someone help us understand: when we should specify an intercept in a Double ML's model_final residual regression? When we should not include any intercept in the last-stage residual regression? And, why? Any theory that underpins the recommended practices? Thanks!

vsyrgkanis commented 3 years ago

The simple answer is never. The final model in the dml module should not need an intercept as any intercept should have been removed by model_y when residualizing the outcome.

also just to make sure: the intercept I’m referring to is not even part of the effect model and should not be confused by the cate_intercept, which is the constant part in a linear cate model.

the only place where one could potentially enable an intercept component in the final model is for finite sample robustness if your final model is very expressive and you might want to further allow for a conditional intercept even if you’ve already residualized model_y. Just in case the final model is more expressive than the model_y model. This could be the case in causalforestdml, and the reason why as a default we have ‘fit_intercept=True’ (this param refers to the final model intercept and not the cate intercept that is used in linear final models). See the docstring of cfdml.

ghost commented 3 years ago

Thank you! Yes makes sense