Skip to content

feat(metrics): add optimal binary threshold - #684

Merged
ulises-jeremias merged 1 commit into
mainfrom
copilot/vsl-threshold-tuning
Nov 24, 2026
Merged

ulises-jeremias merged 1 commit into
mainfrom
copilot/vsl-threshold-tuning

Conversation

@ulises-jeremias

Copy link
Copy Markdown
Member

Adds optimal_threshold, selecting the score threshold that maximizes Youden's J statistic for binary classification.

  • Validates binary labels and finite scores.
  • Reuses the existing ROC implementation.
  • Adds perfect-separation and invalid-input regression coverage.

Local validation from ~/.vmodules: systemd-run --user --scope -p MemoryMax=2G -p MemorySwapMax=0 -p CPUQuota=200% env VJOBS=1 v test vsl/metrics (2/2 passed). Hosted CI is not used as the local merge gate.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ulises-jeremias
ulises-jeremias merged commit c867ec2 into main Nov 24, 2026
19 of 21 checks passed
@ulises-jeremias
ulises-jeremias deleted the copilot/vsl-threshold-tuning branch November 24, 2026 16:31
@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

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.

1 participant