Skip to content

[BUG] Fix range F-beta when beta is not 1 - #3881

Open
SashaMIT wants to merge 1 commit into
aeon-toolkit:mainfrom
SashaMIT:fix/range-fbeta-denominator
Open

SashaMIT wants to merge 1 commit into
aeon-toolkit:mainfrom
SashaMIT:fix/range-fbeta-denominator

Conversation

@SashaMIT

@SashaMIT SashaMIT commented Sep 29, 2026 •

Copy link
Copy Markdown

Reference Issues/PRs

None found.

What does this implement/fix? Explain your changes.

range_f_score divided by beta**2 * (precision + recall). The weighted harmonic mean divides by beta**2 * precision + recall. On the overlapping range already in the tests, precision is 0.75 and recall is 0.6. beta=1 is still 0.666667. beta=0.5 returned 1.666667. It is now 0.714286.

Does your contribution introduce a new dependency? If yes, which one?

No.

Any other comments?

test_range_f_score_beta_is_the_weighted_harmonic_mean failed on main with 1.666667 and passes after the change. The other 8 tests in test_range_ts_metrics.py still pass. The rest of the package pytest suite was not run.

PR checklist

For all contributions
  • I've added myself to the list of contributors. Alternatively, you can use the @all-contributors bot to do this for you after the PR has been merged.
  • The PR title starts with either [ENH], [MNT], [DOC], [BUG], [REF], [DEP] or [GOV] indicating whether the PR topic is related to enhancement, maintenance, documentation, bugs, refactoring, deprecation or governance.

This pull request includes code written with the assistance of AI.

beta=0.5 on a precision of 0.75 and a recall of 0.6 returned 1.666667. The denominator multiplied both terms by beta squared.
@aeon-actions-bot aeon-actions-bot Bot added benchmarking Benchmarking package bug Something isn't working labels Sep 29, 2026
@aeon-actions-bot

Copy link
Copy Markdown
Contributor

Thank you for contributing to aeon

I have added the following labels to this PR based on the title: bug.
I have added the following labels to this PR based on the changes made: benchmarking. Feel free to change these if they do not properly represent the PR.

The Checks tab will show the status of our automated tests. You can click on individual test runs in the tab or "Details" in the panel below to see more information if there is a failure.

If our pre-commit code quality check fails, please run pre-commit locally and push the fixes to your PR branch.

Don't hesitate to ask questions on the aeon Discord channel if you have any.

PR CI actions

These checkboxes will add labels to enable or disable CI functionality for this PR. This may not take effect immediately, and a new commit may be required to run the new configuration.

  • Run pre-commit checks for all files
  • Run mypy typecheck tests
  • Run all pytest tests and configurations
  • Run all notebook example tests
  • Run numba-disabled codecov tests
  • Disable numba cache loading
  • Regenerate expected results for testing
  • Push an empty commit to re-run CI checks

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

benchmarking Benchmarking package bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant