agentsclimarketplace

Auc metric calculation

Skill HolobiomicsLab/asb-skill-collections/collections/metabolomics/v2/skills/auc-metric-calculation

Use when when you have computed true positive rate (TPR) and false positive rate (FPR) values across classification probability thresholds from predicted probabilities and true labels, and need to generate a single aggregate performance metric for model comparison or reporting in omics.From its SKILL.md

Install
npx -y skills add HolobiomicsLab/asb-skill-collections --skill auc-metric-calculation

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 15 stars15 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its file declares

Copied from the file, not written here

The file declares its own license as CC-BY-4.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

4.9 KB, 767 tokens by cl100k_base, as published. Nobody here has run it

auc-metric-calculation

Summary

Compute the Area Under the Curve (AUC) metric from ROC curve data to quantify binary classification model performance. AUC summarizes classification discrimination ability as a single scalar between 0 and 1, suitable for publication-quality reporting alongside ROC visualizations.

When to use

When you have computed true positive rate (TPR) and false positive rate (FPR) values across classification probability thresholds from predicted probabilities and true labels, and need to generate a single aggregate performance metric for model comparison or reporting in omics classification tasks.

When NOT to use

  • Input data contains only a single class or lacks binary labels — AUC is undefined for single-class or multi-class problems without one-vs-rest conversion.
  • Predicted probabilities or true labels are missing or have mismatched dimensions — AUC calculation requires complete paired observations.
  • The classification task is multi-class without explicit binary reduction — standard AUC applies to binary outcomes.

Inputs

  • CSV file with predicted probabilities and binary true labels (e.g., roc_example.csv)
  • Computed pairs of true positive rate and false positive rate across thresholds

Outputs

  • AUC scalar metric (numeric value between 0 and 1)
  • ROC curve plot with AUC annotated and rendered as PNG or PDF

How to apply

After loading predicted probabilities and binary true labels from a CSV file (e.g., roc_example.csv), calculate TPR and FPR pairs across all classification thresholds using statistical libraries (R or Python). The AUC is then computed as the area under the ROC curve using numerical integration (trapezoidal rule or equivalent). The resulting AUC value (ranging from 0 to 1, with 0.5 indicating random classifier performance) should be displayed on the ROC curve plot alongside the visualization and saved as part of the publication-quality figure output (PNG or PDF).

Related tools

  • R Shiny (Interactive dashboard framework for executing ROC curve analysis and AUC calculation, rendering results with annotations) — github.com/databio2022/GraphBio

Evaluation signals

  • AUC value is a scalar numeric between 0 and 1 (exclusive of invalid boundary cases like NaN or out-of-range values)
  • AUC is correctly displayed on the ROC curve plot as a text annotation (e.g., 'AUC = 0.87')
  • Plot is rendered as publication-quality PNG or PDF with clear axes, legend, and AUC label visible
  • AUC value is consistent with manual trapezoidal integration of the TPR/FPR curve pairs
  • For a random classifier (diagonal line from (0,0) to (1,1)), AUC should be approximately 0.5

Limitations

  • AUC does not indicate optimal operating threshold; threshold selection requires domain knowledge or additional metrics (sensitivity/specificity trade-off).
  • AUC can be misleading for highly imbalanced datasets where class prevalence is extreme; precision-recall curves or threshold-adjusted metrics may be more informative.
  • The method assumes predicted probabilities are well-calibrated; poorly calibrated probability estimates may produce misleading AUC values.

Evidence

  • [other] task_id=task_004 workflow definition: "Compute the Area Under the Curve (AUC) metric from the ROC curve."
  • [readme] GraphBio ROC curve capability: "roc_example.csv for ROC curve"
  • [other] ROC curve analysis workflow from task card: "Calculate the ROC curve by computing true positive rate and false positive rate across classification thresholds using R or Python statistical libraries."
  • [other] Output format specification: "Render the ROC curve as a publication-quality figure with AUC displayed on the plot and save as a PNG or PDF file."

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.