-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
Add recall_score function in Ivy with Test #27986
Conversation
This commit introduces the recall_score function, which calculates recall for binary or multilabel classification using Ivy's framework. The function supports micro, macro, and binary averaging, as well as the optional use of sample weights. Additionally, the code includes appropriate comments for better readability and understanding.
This commit includes a test for the recall_score function, leveraging the Hypothesis library. The test checks the integration of Ivy's recall_score with the specified backend and frontend configurations, covering various input scenarios. The test logic ensures appropriate handling of data types, values, and optional parameters such as 'average' and 'sample_weight'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Compliance Checks
Thank you for your Pull Request! We have run several checks on this pull request in order to make sure it's suitable for merging into this project. The results are listed in the following section.
Issue Reference
In order to be considered for merging, the pull request description must refer to a specific issue number. This is described in our contributing guide and our PR template.
This check is looking for a phrase similar to: "Fixes #XYZ" or "Resolves #XYZ" where XYZ is the issue number that this PR is meant to address.
Protected Branch
In order to be considered for merging, the pull request changes must not be implemented on the "main" branch. This is described in our Contributing Guide. We are closing this pull request and we would suggest that you implement your changes as described in our Contributing Guide and open a new pull request.
Conventional Commit PR Title
In order to be considered for merging, the pull request title must match the specification in conventional commits. You can edit the title in order for this check to pass.
Most often, our PR titles are something like one of these:
- docs: correct typo in README
- feat: implement dark mode"
- fix: correct remove button behavior
Linting Errors
- Found type "null", must be one of "feat","fix","docs","style","refactor","perf","test","build","ci","chore","revert"
- No subject found
Hi @zeus2x7 , Thank you in advance! |
Hi @NiteshK84 , It's been a few days since I sent the pull request and I haven't received any feedback from you. I'm wondering if you have had a chance to review it. Please let me know if you have any questions or comments about the pull request. I'm happy to make any changes that you suggest. Thank you for your time and attention. |
@@ -5,6 +5,49 @@ | |||
import numpy as np | |||
|
|||
|
|||
@handle_frontend_test( | |||
fn_tree="your.module.path.recall_score", # Update with the correct module path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @muzakkirhussain011 could you name it correctly with the module path?
Hi @zeus2x7 , |
Hi @zeus2x7 , It's been almost a month since I sent the pull request. I have made the required changes. Please let me know if you have any questions or comments about the pull request. I'm happy to make any changes that you suggest. Thank you for your time and attention. |
|
Hi @NiteshK84 , It's been almost a month since I sent the pull request. I have made the required changes. Please let me know if you have any questions or comments about the pull request. I'm happy to make any changes that you suggest. Thank you for your time and attention. |
Hi @muzakkirhussain011, |
Hi @NiteshK84 All backend tests are now passing with the updated code. Please find the attached screenshot for confirmation. |
Hi @zeus2x7 , I have completed the backend tests, and all tests are passing successfully. I’ve attached a screenshot of the test results for your reference. Could you please prioritize the review of this pull request at your earliest convenience? Your timely feedback will be greatly appreciated. |
Hi @zeus2x7 , I've addressed all the requested changes and the backend tests are passing. Could you please review the updates? Thank you! Best Regards |
LGTM! |
Co-authored-by: ivy-branch <ivy.branch@lets-unify.ai>
PR Description
This PR introduces the recall_score function in Ivy, supporting binary or multilabel classification. It calculates recall with options for micro, macro, and binary averaging, along with support for sample weights. The code includes clear comments for readability.
A property-based test (test_recall_score) has been added using Hypothesis to ensure the correctness of the recall_score function across diverse input scenarios.
Changes:
Added recall_score function implementation.
Included property-based test (test_recall_score) for comprehensive validation.
Added comments for code clarity
Checklist