Repository navigation
ROCAUC and Average Precision Metrics - #522
Merged
Merged
Conversation
andrewdalpino
requested review from
a team
and
a balanced review from Copilot
October 15, 2026 04:47
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
All-positive Average Precision inputs and distinct numeric-string class names can produce incorrect scores.
2 open findings
What changed in this PR
Adds ROC AUC and Average Precision to Rubix ML’s probabilistic cross-validation metrics.
Changes:
- Implements positive-class ranking metrics with tie handling.
- Adds tests for ranking quality, empty inputs, and integer classes.
- Documents both metrics and adds navigation links.
| File | Description |
|---|---|
| tests/CrossValidation/Metrics/ROCAUCTest.php | Tests ROC AUC scoring. |
| tests/CrossValidation/Metrics/AveragePrecisionTest.php | Tests Average Precision scoring. |
| src/CrossValidation/Metrics/ROCAUC.php | Implements rank-based ROC AUC. |
| src/CrossValidation/Metrics/AveragePrecision.php | Implements recall-weighted precision. |
| mkdocs.yml | Adds metric navigation entries. |
| docs/cross-validation/metrics/rocauc.md | Documents ROC AUC usage. |
| docs/cross-validation/metrics/average-precision.md | Documents Average Precision usage. |
| docs/cross-validation.md | Lists both probabilistic metrics. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
samuel-akopyan
left a comment
Contributor
There was a problem hiding this comment.
Nice work, the ranking logic and tie handling look correct and I verified the expected values in the test providers by hand. A few small things below.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Two Probabilistic metrics that measure the area under a curve. ROCAUC measure the areas under the ROC curve and Average Precision measure the area under the precision-recall curve.