跳到正文
cccskills
免费在 GitHub 公开

designing-leakage-safe-experiments

Design leakage-safe machine learning experiments that mirror real deployment and support fair model comparisons. Use when defining prediction timing, feature eligibility, train-validation-test splits, baselines, metrics, or controlled model iterations; not for auditing whether raw labels are trustworthy.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(4)

  • SKILL.md3.8 KB
  • agents/openai.yaml264 B
  • assets/leakage-safe-experiment-plan.md2.9 KB
  • references/leakage-threats-and-splits.md4.5 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Design Leakage-Safe Experiments

Create an experiment whose result would remain credible when the model meets new data in its intended operating environment. Leakage prevention starts with time and causality, not with a random split parameter.

Define the prediction event

Write down:

  • entity and prediction grain;
  • decision made from the prediction;
  • prediction timestamp and feature cutoff;
  • outcome definition and maturity window;
  • eligible population at prediction time;
  • deployment cadence, horizon, and retraining policy;
  • operational cost of each error type.

Build an availability ledger for candidate features: source event, observation time, recording delay, correction or backfill behavior, earliest production availability, and whether the value depends on the outcome. Exclude or reconstruct features that would not exist in the same form at prediction time.

Read references/leakage-threats-and-splits.md when choosing a split or investigating a suspected leakage path.

Lock the comparison protocol

  1. Choose a split that matches deployment: temporal for future generalization, grouped for repeated entities, spatial or site holdout for new locations, or a justified combination.
  2. Reserve the final test set before feature selection or tuning. Repeated test inspection turns it into validation data.
  3. Fit preprocessing, imputation, encoding, scaling, selection, and resampling only on the training portion of each fold.
  4. Fit a calibrator from a separate calibration split or from out-of-fold predictions that did not train the base prediction for those records.
  5. Choose the operating threshold or decision policy from validation or calibration evidence. Keep the final test untouched until the model, calibrator, and policy are locked.
  6. Define primary and guardrail metrics before seeing candidate results.
  7. Establish a transparent baseline: prevalence, naive forecast, rule, or simple regularized model as appropriate.
  8. Hold data, split, metric implementation, and compute budget constant while comparing one material change at a time.
  9. Record every run, including failures and negative results. Complexity earns adoption only through a repeatable, decision-relevant improvement.

Challenge the design

Test for duplicate or near-duplicate rows across folds; entity, household, device, site, or document overlap; target proxies; post-outcome updates; full-dataset preprocessing; retrospective cohort filters; label-window overlap; and repeated tuning against the holdout.

Where risk is material, run a temporal backtest, group holdout, label or feature permutation check, suspicious-feature ablation, and slice stability analysis. A surprisingly strong result is a reason to investigate, not a reason to relax scrutiny.

Ask for approval when a choice changes the business target, acceptable error tradeoff, evaluation population, or deployment assumptions. Make routine technical choices within the agreed protocol and document them.

Produce the protocol

Use assets/leakage-safe-experiment-plan.md before implementation. The finished protocol must let a reviewer determine:

  • what was knowable at prediction time;
  • why no entity or future information crosses folds;
  • how the baseline and candidates receive an equal comparison;
  • which set controls tuning and which set supports the final claim;
  • what improvement would justify added complexity;
  • which observed failures remain unresolved.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Audit datasets, joins, labels, and ground truth before analysis or modeling. Use when data meaning, row grain, time semantics, source-of-truth reliability, or label construction may invalidate conclusions; not for general model evaluation after the evidence base is already trusted.

中文简介正在准备中。当前显示原文说明。

aiopshwang/data-analysis-ml-agent-skills132026年8月27日 更新

Isolate the root cause of ML performance drops, inconsistent evaluations, prediction errors, and training-serving mismatches across data, labels, splits, pipelines, models, metrics, and runtime behavior. Use when investigating a reproducible failure or regression, not routine model selection or general performance validation.

中文简介正在准备中。当前显示原文说明。

aiopshwang/data-analysis-ml-agent-skills132026年8月27日 更新

Orchestrate an end-to-end data analysis or machine learning project from decision framing through reproducible handoff. Use when a request spans multiple lifecycle stages or an ambiguous modeling request must become a decision-ready result; use narrower audit or experiment-design skills for isolated reviews.

中文简介正在准备中。当前显示原文说明。

aiopshwang/data-analysis-ml-agent-skills132026年8月27日 更新

Package completed data analysis and ML work so an independent recipient can reproduce the claimed results, verify artifact lineage, and operate the handoff within its stated scope. Use when finalizing a project, study, model package, or review bundle; not for deploying to a live system.

中文简介正在准备中。当前显示原文说明。

aiopshwang/data-analysis-ml-agent-skills132026年8月27日 更新

Route data analysis and machine learning work to the right skill in this suite. Use when starting any analysis, modeling, validation, or reproducibility task and the matching specialized skill is not yet clear; not needed when one specific skill already clearly applies.

中文简介正在准备中。当前显示原文说明。

aiopshwang/data-analysis-ml-agent-skills132026年8月27日 更新

Validate trained models and analytical claims against their intended decision, independent evidence, and human-reviewed ground truth. Use when reviewing model performance, analysis conclusions, launch claims, or evaluation reports; use failure diagnosis instead when the main task is locating a known defect.

中文简介正在准备中。当前显示原文说明。

aiopshwang/data-analysis-ml-agent-skills132026年8月27日 更新

查看 aiopshwang 的全部技能

报告此技能的问题