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

converting np float result to float in binary classification evaluator #3076

Merged
merged 1 commit into from
Nov 26, 2024

Conversation

JINO-ROHIT
Copy link
Contributor

Fixes #3075

A simple fix to change the result np.floats to float.

I had two options -

  1. using .item()
  2. using type cast float()

float() seemed slightly faster so i went with it.

Who can review
@tomaarsen

Copy link
Collaborator

@tomaarsen tomaarsen left a comment

Choose a reason for hiding this comment

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

I like float - it keeps working even if sklearn or something updates their output type from np.float32/np.float64 to regular float, unlike .item().

I'll try this out locally tomorrow morning I suspect, but it looks solid at a glance.

Thanks!

@tomaarsen
Copy link
Collaborator

Apologies for the delay!
I tested this locally and it works like a charm. Thanks for reporting @chr-werner and thanks for fixing @JINO-ROHIT!

  • Tom Aarsen

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.

BinaryClassificationEvaluator returns np.float32() and np.float64()
2 participants