Rough understanding and memo of when to use causal reasoning using machine learning methods that have been popular in recent years (memorandum) Basically, a flow chart summary of the current causal reasoning method
Causal reasoning is a series of statistical methods aimed at answering the cause for the result. In general, statistical approaches such as regression analysis focus on quantifying how changes in X relate to changes in Y. On the other hand, statistical causal reasoning emphasizes determining whether a change in X causes a change in Y and quantifying this causal relationship. The field of fusion of machine learning and causal reasoning, which has become popular in recent years, is used to estimate causal effects under specific conditions. This time, we have roughly organized the proper use of existing causal reasoning methods and methods using machine learning.
Naturally, we will analyze the data we have after clarifying "what and why do you want to know?" Otherwise, I can't see the tactics to take.
Various policies are taken for causal reasoning. Therefore, various methods can be considered to perform causal inference from the data that one has. First, in order to understand causal reasoning structurally, we divide it into two categories. This time, we will identify whether the data we have is experimental data or observation data, and look at typical approaches for each.
In the case of experimental data, the estimation is clearer and easier to understand than the observed data because the experiment was designed to verify the causal effect. In many cases, the analysis is performed so as to approach the RCT (Randomized Controlled Trial) condition. However, the average causal effect estimation during the designed experiment can be estimated by using the classical statistical causal reasoning method. However, there are times when you want to estimate not only the average causal effect, but also the causal effect under specific circumstances and conditions. Therefore, in recent years, it has been made possible by causal reasoning that interweaves machine learning methods.
The experimental data will be broadly divided into four categories.
--Differences in covariates between intervention and non-intervention --Part of the intervention group is non-intervention --Effects differ for each subgroup within the intervention group --Structural understanding of causality
If the data you have is judged to be experimental data, consider it in order from the top. Then perform the desired analysis.
This is a general causal reasoning. Basically, it is assumed that you want to estimate the causal effect between the intervention group and the non-intervention group. At that time, covariates other than treatment (cause) and response (effect) differ between groups. Then, the correct effect cannot be estimated. Therefore, this covariate is adjusted so that it is as equal as possible between the groups, and then the estimation is performed. The main policies are DID, matching, IPW, etc.
→ DID, matching, IPW etc.
Randomly assigned interventions do not always follow (non-compliance) because of the unbiased estimation of intervention effects in experimental studies. If the allocation of interventions is equal to the intervention actually received, the individual has adhered to the assigned intervention. On the other hand, if they are not equal, it is non-compliance. In other words, under non-compliance conditions, the intervention group will be a mixture of different groups of compliance and non-compliance groups. Therefore, it is necessary to estimate the average causal effect limited to the compliance group (LATE).
→ Instrumental variable (IV)
Within the intervention group, each sample has a different covariate. Then, when determining the intervention effect for each specific sample, it is necessary to calculate the intervention effect personalized under specific conditions within the intervention group. Causal reasoning using so-called machine learning.
→ HTE(Heterogeneous Treatment Effects)、Uplift Modeling → GRF (Generalized Random Forest) and ORF (Orthogonal Random Forest) estimate the intervention effect without calculating the propensity score. → Meta-Learner estimates the intervention effect from the estimated value using the propensity score after modeling and estimating the effect for each group.
When one variable affects another, it may act directly or indirectly through a parameter. At this time, it is important to analyze how direct and indirect the effects affecting the variables are. By understanding not only the relationship between the cause and the effect but also the mechanism that caused the result, it becomes possible to analyze which parameter should be changed to obtain a high effect.
→ Mediation analysis
In the case of observation data, many are observed regularly. At that time, it will be used as time series data. On the other hand, if it is not time series data, variables other than the cause and effect variables will be defined. At this time, sufficient knowledge about a specific situation is required. It is necessary to determine the causal structure based on this.
The observation data is divided into cases as follows.
Heterogeneous Treatment Effects (HTE) Individuals differ not only in their background characteristics, but also in their response to specific treatments, interventions, or stimuli. In particular, therapeutic effects may vary systematically depending on treatment trends (Xie et al., 2012). And in the presence of this heterogeneity of effects, the estimation of the Average Treatment Effect (ATE), a classical causal reasoning approach using the main effects, did not always provide sufficient estimation. Therefore, by considering Heterogeneous Treatment Effects (HTE) as an estimation of intervention effects that take into account the effects at a personal level such as background, it is possible to make an estimation that takes into account each of these effects. At that time, causal reasoning is executed using machine learning.
There are libraries and packages in R and Python. The typical ones are as follows.
R ・ Grf ・ Uplift ・ Llearner
Python ・ EconML ・ CausalML ・ Pylift
・ A bird's-eye view of the causal reasoning that is attracting attention at the Nobel Prize in Economics https://note.com/tak1/n/nf35b48502339 ・ Using Causal Inference to Improve the Uber User Experience https://eng.uber.com/causal-inference-at-uber/ ・ Summary of research on X-Learner https://dev.classmethod.jp/articles/causal-metalearner-xlearner/ ・ Introduction of EconML package (meta-learners edition) https://usaito.hatenablog.com/entry/2019/04/07/205756 ・ Yu Xie, Jennie E. Brand, and Ben Jann. (2012) Estimating Heterogeneous Treatment Effects with Observational Data. Sociol Methodol 42 (1): 314-347.
Recommended Posts