+ "source": "# `unshrink`: Debiasing ML Predictions for Causal Inference\n\n**unshrink** is a Python package for correcting attenuation bias in machine learning predictions when used for downstream causal inference tasks.\n\n## The Problem\n\nWhen ML models are used to impute outcomes for causal analysis, the predicted values tend to be \"shrunk\" toward the mean compared to the true values. This shrinkage attenuates treatment effect estimates, leading to biased causal conclusions.\n\n## The Solution\n\nThis package implements debiasing methods from [Pettersson, Jerzak & Daoud (2025)](https://arxiv.org/abs/2508.01341) that correct for this attenuation without requiring additional ground truth data at test time:\n\n- **TweedieDebiaser**: Uses Tweedie's formula with KDE-based score estimation\n- **LccDebiaser**: Linear Calibration Correction via inverse linear regression\n\nBoth follow a simple sklearn-like API: `fit()` on calibration data, then `debiased_mean()` or `debiased_ate()` on test predictions.\n\n---\n"
0 commit comments