Skip to content
Back to skills

Detection Metric Protocol

ASecurity

Compute AUROC and AUPR detection metrics with paper-faithful score orientations for softmax confidence baselines.

  • 247 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 9, 2026
testingpython

Security analysis

A100/100

Scanned September 9, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill detection_metric_protocol --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Detection Metric Protocol?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Detection Metric Protocol
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-detection-metric-protocol/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-detection-metric-protocol)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
---
name: detection_metric_protocol
description: Compute AUROC and AUPR detection metrics with paper-faithful score orientations for softmax confidence baselines.
---

# Threshold-Independent Detection Metrics

Use this skill when evaluating maximum-softmax-probability detectors for misclassification or out-of-distribution examples. It implements the paper convention of reporting AUROC and AUPR rather than choosing a single threshold.

## Inputs
- Binary labels where `1` is the positive detector class.
- Numeric scores where larger means more likely positive.
- Optional metadata naming the protocol, such as `success`, `error`, `in`, or `out`.

## Outputs
- `auroc`, `aupr`, `base_rate`, counts, and sorted ranking diagnostics.

## Workflow
1. Choose score orientation before calling the metric: MSP for success/in-distribution positive, negative MSP for error/out-of-distribution positive.
2. Compute AUROC as pairwise positive-vs-negative ranking probability with half credit for ties.
3. Compute average precision by scanning descending scores and averaging precision at positive ranks.
4. Report the positive base rate so AUPR can be compared to the random baseline.

## Validation
Run `python tests/test_metrics.py` or validate the full skill tree with `validate_skill_tree.py --run-tests`.

## Limitations
This skill does not infer labels or generate scores. It assumes the caller has already created paper-faithful positive labels and score orientation.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.