Skip to main content
Execute qualquer Skill no Manus
com um clique

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

Estrelas1
Forks0
Atualizado8 de julho de 2026 às 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

Instalação

Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.

SKILL.md
readonly