Skip to main content
在 Manus 中运行任何 Skill
一键导入

target-leakage-guard-misses-transforms-of-the-target

星标1
分支0
更新时间2026年7月8日 12:14

Use when reviewing/building a regression, forecasting, BSTS, or causal-inference pipeline that assembles a covariate / feature / regressor list and guards against including the outcome — i.e. you see a filter like `[c for c in x_cols if c != y_col]`, `cols.drop(target)`, `features.remove(label)`, "outcome must not be a covariate", or "exclude the target column". The trap: that guard excludes ONLY the exact target column NAME, so a column that is a deterministic TRANSFORM of the target — `log_<target>` (= log1p(y)), `<target>_scaled`, `<target>_lag0`, a standardized or Box-Cox version, a ratio whose numerator is the target — slips through and becomes a regressor. A feature that IS the target (on another scale) gets a fitted weight ≈ 1.0, "explains" the outcome trivially, and CONTAMINATES the whole fit (near-perfect counterfactual → meaningless effect estimate / CI / p-value), not just a display. Trigger also when a per-feature weight/importance panel shows one covariate ≈ 1.0 dominating everything else by ~100

安装

用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。

SKILL.md
readonly