Skip to content

spec: add precision-recall specification#2279

Merged
github-actions[bot] merged 1 commit intomainfrom
specification/precision-recall
Dec 26, 2025
Merged

spec: add precision-recall specification#2279
github-actions[bot] merged 1 commit intomainfrom
specification/precision-recall

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

New Specification: precision-recall

Related to #2274


specification.md

precision-recall: Precision-Recall Curve

Description

A Precision-Recall curve plots precision (positive predictive value) against recall (sensitivity) at various classification thresholds. This visualization is essential for evaluating binary classifiers on imbalanced datasets where accuracy alone is misleading. The area under the curve (Average Precision) summarizes classifier performance, with higher values indicating better performance.

Applications

  • Evaluating fraud detection models where fraudulent transactions are rare compared to legitimate ones
  • Assessing medical diagnostic systems where correctly identifying positive cases (high recall) is critical
  • Comparing information retrieval systems for document search relevance ranking
  • Optimizing spam filters to balance catching spam (recall) with minimizing false positives (precision)

Data

  • y_true (binary array) - Ground truth binary labels (0 or 1)
  • y_scores (numeric array) - Predicted probabilities or decision function scores from classifier
  • Size: 100-10000 samples typical for evaluation
  • Example: Binary classification predictions from sklearn classifier with predict_proba() output

Notes

  • Display Average Precision (AP) score in legend or annotation
  • Include baseline reference line showing random classifier performance (horizontal line at positive class ratio)
  • Use stepped line style to accurately represent threshold-based curve
  • Consider showing iso-F1 curves as contour lines for F1 score reference
  • For multiple classifiers comparison, use distinct colors with clear legend

Next: Add approved label to the issue to merge this PR.


🤖 spec-create workflow

@github-actions github-actions Bot merged commit 95e3f29 into main Dec 26, 2025
3 checks passed
@github-actions github-actions Bot deleted the specification/precision-recall branch December 26, 2025 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants