Skip to content

Add fbeta to single classification result#45

Merged
dfuchss merged 3 commits intomainfrom
feature/fbeta
Feb 18, 2026
Merged

Add fbeta to single classification result#45
dfuchss merged 3 commits intomainfrom
feature/fbeta

Conversation

@dfuchss
Copy link
Copy Markdown
Member

@dfuchss dfuchss commented Feb 16, 2026

This pull request adds a new method to the SingleClassificationResult class to support calculating the F-beta score for classification results. This enhances the metrics capabilities by allowing users to compute F-beta scores with arbitrary beta values.

Metrics calculation enhancement:

  • Added an fBeta(beta: Double) method to the SingleClassificationResult class to compute the F-beta score, including error handling for invalid beta values and a shortcut for the F1 score.

Copilot AI review requested due to automatic review settings February 16, 2026 16:29
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds support for calculating the F-beta score to the SingleClassificationResult class. The F-beta score is a generalization of the F1 score that allows users to weight precision and recall differently by adjusting the beta parameter.

Changes:

  • Added a new fBeta(beta: Double) method to calculate F-beta scores with arbitrary beta values
  • Included validation to prevent division by zero when beta equals 0.0
  • Implemented an optimization to return the pre-computed F1 score when beta equals 1.0

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

dfuchss and others added 2 commits February 16, 2026 17:36
…result/SingleClassificationResult.kt

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…result/SingleClassificationResult.kt

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@sonarqubecloud
Copy link
Copy Markdown

@Gram21 Gram21 self-assigned this Feb 16, 2026
@Gram21
Copy link
Copy Markdown
Member

Gram21 commented Feb 16, 2026

LGTM

@dfuchss dfuchss merged commit 1344897 into main Feb 18, 2026
7 checks passed
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.

3 participants