跳到正文
FunCoding

evaluate-model

Evaluate binary classification or regression models with confusion-matrix metrics, tie-aware ROC AUC, regression errors, and deterministic bootstrap confidence intervals; emphasizes held-out data, uncertainty, baselines, and subgroup checks.

Star
676
分类
科研
许可证
MIT
最近提交
2026年12月2日

skills/evaluate-model/SKILL.md

在 GitHub 上查看

Evaluate a model

Use this skill when comparing predictive models, selecting a threshold, or reporting held-out performance. Compute metrics only after defining the target, unit of analysis, split boundary, baseline, and decision cost.

Workflow

  1. Confirm that evaluation examples and related entities were never used for fitting, preprocessing, feature selection, or threshold selection.
  2. Choose a primary metric from the scientific or operational question; do not select it after inspecting test results.
  3. Compare against a simple baseline and report uncertainty, not only a point estimate.
  4. Inspect clinically or scientifically relevant subgroups and failure modes.
  5. Keep probability quality, ranking quality, and thresholded decisions separate. Accuracy is rarely sufficient for an imbalanced target.
  6. Save predictions with stable sample IDs so every aggregate is auditable.

Import and run

from importlib import import_module

metrics = import_module("evaluate-model.kernel")
classification = metrics.binary_classification_metrics(
    y_true, scores=probabilities, threshold=0.35
)
regression = metrics.regression_metrics(y_true_continuous, predictions)
interval = metrics.bootstrap_ci(per_sample_losses, resamples=2000, seed=42)

The binary helper reports the confusion matrix, accuracy, precision, recall, specificity, F1, balanced accuracy, and tie-aware ROC AUC when scores are provided. Undefined ratios are returned as None, not silently replaced by zero.

Reporting contract

State the split strategy, sample and group counts, prevalence, threshold source, primary metric with interval, baseline, subgroup caveats, and all exclusions. Bootstrap intervals describe sampling variability under the resampling unit; they do not correct leakage, dataset shift, measurement error, or dependence between observations. Use grouped or clustered resampling when rows are not independent.

相似的 Skill

graphify

GRGraphify-Labs/graphify156k近 7 天新增 2,124 个 star

wiki-query

PApaperclipai/paperclip119k近 7 天新增 1,727 个 star

官方

clinical-case-report

NEnexu-io/open-design111k近 7 天新增 1,079 个 star

style-sampling

HEheygen-com/hyperframes94k近 7 天新增 3,834 个 star

academic-paper-review

BYbytedance/deer-flow86k近 7 天新增 245 个 star

systematic-literature-review

BYbytedance/deer-flow86k近 7 天新增 245 个 star