|
| 1 | +.. _ClassTransformationReg: |
| 2 | + |
| 3 | +******************** |
| 4 | +Transformed Outcome |
| 5 | +******************** |
| 6 | + |
| 7 | +Let's redefine target variable, which indicates that treatment make some impact on target or |
| 8 | +did target is negative without treatment: |
| 9 | + |
| 10 | +.. math:: |
| 11 | + Z = Y * \frac{(W - p)}{(p * (1 - p))} |
| 12 | +
|
| 13 | +* :math:`Y` - target vector, |
| 14 | +* :math:`W` - vector of binary communication flags, and |
| 15 | +* :math:`p` is a *propensity score* (the probabilty that each :math:`y_i` is assigned to the treatment group.). |
| 16 | + |
| 17 | +It is important to note here that it is possible to estimate :math:`p` as the proportion of objects with :math:`W = 1` |
| 18 | +in the sample. Or use the method from [2], in which it is proposed to evaluate math:`p` as a function of :math:`X` by |
| 19 | +training the classifier on the available data :math:`X = x`, and taking the communication flag vector math:`W` as |
| 20 | +the target variable. |
| 21 | + |
| 22 | +.. image:: https://habrastorage.org/r/w1560/webt/35/d2/z_/35d2z_-3yhyqhwtw-mt-npws6xk.png |
| 23 | + :align: center |
| 24 | + :alt: Transformation of the target in Transformed Outcome approach |
| 25 | + |
| 26 | +After applying the formula, we get a new target variable :math:`Z_i` and can train a regression model with the error |
| 27 | +functional :math:`MSE= \frac{1}{n}\sum_{i=0}^{n} (Z_i - \hat{Z_i})^2`. Since it is precisely when using MSE that the |
| 28 | +predictions of the model are the conditional mathematical expectation of the target variable. |
| 29 | + |
| 30 | +It can be proved that the conditional expectation of the transformed target :math:`Z_i` is the desired causal effect: |
| 31 | + |
| 32 | +.. math:: |
| 33 | + E[Z_i| X_i = x] = Y_i^1 - Y_i^0 = \tau_i |
| 34 | +
|
| 35 | +.. hint:: |
| 36 | + In sklift this approach corresponds to the :class:`.ClassTransformationReg` class. |
| 37 | + |
| 38 | +References |
| 39 | +========== |
| 40 | + |
| 41 | +1️⃣ Susan Athey and Guido W Imbens. Machine learning methods for estimating heterogeneouscausal effects. stat, 1050:5, 2015. |
| 42 | + |
| 43 | +2️⃣ P. Richard Hahn, Jared S. Murray, and Carlos Carvalho. Bayesian regression tree models for causal inference: regularization, confounding, and heterogeneous effects. 2019. |
0 commit comments