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.87k stars 720 forks source link

How can I calculate the treatment effect function in a double machine learning model? #887

Open Wangpc-972 opened 5 months ago

Wangpc-972 commented 5 months ago

On this website, the fourth line of code is:

# Treatment effect function  
def exp_te(x):  
    return np.exp(2*x[0])

How can I obtain such an equation from real data? Or how can I calculate the 'True effect'?

Looking forward to your reply. Thank you/

kbattocchi commented 5 months ago

In a real application, the true treatment effect will be unknown. The effect method of our estimators is how you'd estimate it; for example the notebook you're referencing shows the estimates of a few different estimators compared to the true effect after cell 10.