Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: calibrateThreshold throws IndexOutOfBounds for low LC in combination with relatively few test instances #80

Merged

Conversation

lorsbach
Copy link

@lorsbach lorsbach commented Aug 2, 2023

In cases where the label cardinality is low and there are few test instances at the same time, calibrateThreshold throws an IndexOutOfBounds Exception.

This PR adds an additional check if to avoid the IndexOutOfBounds Exception by using the mean of the last two obtained probabilities.

Additionally within the existing edge case the bracketing seemed to be wrong and is fixed as well together with the removal of unnecessary casts.

…oved unnecessary double casts, fixed bracketing
@fracpete fracpete merged commit 93e9935 into Waikato:master Aug 2, 2023
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.

2 participants