AGENT SKILL

metrics

Routes scikit-plot metric-curve requests for confusion matrices, ROC, precision-recall, KS, calibration, gain, lift, and silhouette plots.

License 许可
MIT
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
metrics
license
MIT
metadata
{ "disco-role": "operating" }
description
Routes scikit-plot metric-curve requests for confusion matrices, ROC, precision-recall, KS, calibration, gain, lift, and silhouette plots.
disable-model-invocation
true

02 资源文件 4

03 SKILL.md 正文

Metrics

Use this sub-skill for the current scikitplot.metrics plotting functions. These functions consume labels, predictions, probabilities, scores, or cluster labels and return Matplotlib Axes objects.

Route here

  • Confusion matrices: plot_confusion_matrix.
  • Multiclass or binary ROC curves: plot_roc; legacy code may still call plot_roc_curve.
  • Multiclass or binary precision-recall curves: plot_precision_recall; legacy code may still call plot_precision_recall_curve.
  • Binary probability diagnostics: plot_ks_statistic, plot_calibration_curve, plot_cumulative_gain, plot_lift_curve.
  • Silhouette analysis from X plus cluster labels: plot_silhouette.
  • Quick validation of the metric family: scripts/metrics_smoke.py.

Inputs to check first

  1. For confusion matrices, provide y_true and y_pred with aligned sample order.
  2. For ROC and precision-recall, pass a 2-D probability matrix shaped (n_samples, n_classes).
  3. For KS, cumulative gain, lift, and calibration, use binary targets unless the function explicitly supports multiclass.
  4. For silhouette, provide the feature matrix and one cluster label per sample.
  5. Pass ax= when composing figures; every route should return the axes it drew on.

Common decisions

  • Use labels, true_labels, and pred_labels to reorder or subset confusion-matrix axes.
  • Use plot_micro, plot_macro, and classes_to_plot on the current ROC/PR APIs instead of the older curves tuple where possible.
  • Use n_bins for calibration only after confirming enough binary samples per bin.
  • Keep probability columns in the same class order used by the fitted classifier.
  • Set a non-interactive Matplotlib backend such as Agg for automation or smoke checks.

Reroute

  • Feature importance or learning curves: ../estimators/SKILL.md.
  • Elbow-curve cluster sweeps: ../clustering/SKILL.md.
  • PCA variance or 2-D projection: ../decomposition/SKILL.md.
  • Factory-injected bound methods or deprecated scikitplot.plotters: ../legacy-factories/SKILL.md.

Read next

  • references/api-reference.md for verified signatures, input constraints, and deprecated aliases.
  • references/workflows.md for concrete call patterns by plot family.
  • references/troubleshooting.md for binary-only restrictions, shape errors, label validation, and compatibility failures.
  • scripts/metrics_smoke.py for a tiny Agg-backed smoke run covering the main metric plot families.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-triton-opt

Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-solve

END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-skill

PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-pattern-fusion

Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-orchestrate

Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-feedback

Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).

★ 351