Quantco / metalearners

MetaLearners for CATE estimation
https://metalearners.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
34 stars 4 forks source link

Fix S-Learner's leakage #79

Closed kklein closed 3 months ago

kklein commented 3 months ago

This PR seeks to address @ArseniyZvyagintsevQC 's finding that the current implementation of the S-Learner's estimation of the conditional average outcomes is not quite kosher in the in-sample scenario.

Concretely, having observed $X_i, Y_i, W_i=k$, we currently consider $i$ to be unseen when estimating $\mathbb{E}[Y_i|X_i,W_i=k']$ if $k' \neq k$. Yet, the estimator has seen $Y_i$, which may lead to some leakage.

Checklist

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 94.41%. Comparing base (d00947a) to head (7124492). Report is 11 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #79 +/- ## ========================================== - Coverage 94.43% 94.41% -0.02% ========================================== Files 15 15 Lines 1779 1774 -5 ========================================== - Hits 1680 1675 -5 Misses 99 99 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.