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.71k stars 700 forks source link

Monotonicity constraints for effect prediction #315

Open ncorream opened 3 years ago

ncorream commented 3 years ago

Hello again,

I have been trying to implement DML methods to predict the causal effect of a continuous treatment (from 0 to 300 aprox) and even if I got to the point of having a fairly good MSE score, almost half of the effects predicted are negative. I am an expert on the field from where the database is extracted, and it is impossible for this drug to have a negative effect. The effect is always positive, and increasing with higher quantities of treatment (up to a plateu in some patients).

My question is, is it possible to apply monotonicity constraints to the final model and in doing so specifying to the estimator that the treatment can only increase the effect?

Thank you in advance!

kbattocchi commented 3 years ago

It's possible to use a final model that enforces monotonicity (such as sklearn's Lasso with positive=True), but I'd be concerned that the fact that your results don't match your intuition might indicate that actually you have some unmeasured confounders that aren't being reflected in your first stage residuals.

ncorream commented 3 years ago

Thank you I will try that. And yes, I have been thinking that I have some unknown confounders, because with a fake outcome variable dependent on treatment and confounders (in a positive trend) the model works just fine.