Closed wenyaoliu closed 9 months ago
Hi, thanks for your question. So in general there are many possible ways to do this. One excellent reference book is Element of Causal Inference (https://mitpress.mit.edu/9780262037310/elements-of-causal-inference/). To answer your question, for example, given the graph, you can use do-calculus to simply $p(Y|do(X))$ to conditional probabilities and estimate it.
Or you can fit an structural equation model (SEM) to your generated data, and use the mutilated graph (i.e. by cutting out all the incoming edges to the intervened variable) and the corresponding SEM to estimate the intervention distribution $p(Y|do(X))$.
For the latter case, you can fit DECI model with prior graph as the true graph, and estimate the intervention distribution. If you work with the mutilated graph, it is the same as prediction problem.
For estimating intervention distribution with Causica, please see the ATE estimation in https://github.com/microsoft/causica/blob/main/examples/multi_investment_sales_attribution.ipynb
I was learning causal inference and discovery these days and have suffered from this question for a long time.
From my understanding of the literature, causal inference seems quite different from traditional machine learning. For traditional machine learning, once the model is trained, and given a set of X, the model directly predicts Y's value.
However, for the causal inference, the model answers if X1 changes from 1 to 2, for example, it will return the causal effects on Y.
So how can I answer the prediction question using causal inference?
Here are some simulated data using this graph:
[100 rows x 3 columns]
The problem is:
How to make predictions on Y when X = 10, Z = 20 pretending that you only know the causal graph but not the detailed causal function?
I have tried using microsoft causia to identify the causal graph. And also the causal inference, but they are not prediction problems.