Skip to main content
تشغيل أي مهارة في Manus
بنقرة واحدة

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

النجوم١
التفرعات٠
آخر تحديث٨ يوليو ٢٠٢٦ في ١٢:١٤

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