feat: Integrate F1 score function to frontend, align with sklearn met… #28487
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Description
Pull Request - Add F1 Score Function to Ivy Frontend Sklearn Metrics
Overview
This pull request introduces a new feature to the Ivy machine learning framework. It adds an F1 score calculation function, which is a commonly used metric for evaluating the accuracy of a binary classification model.
Details
The F1 score is a measure of a test's accuracy and is the harmonic mean of the precision and recall. The new function is integrated into the frontend metrics of Ivy, aligning with the existing Scikit-learn metrics. This ensures that users familiar with Scikit-learn can easily adapt to using Ivy for their machine learning tasks.
Implementation
f1_score
function has been implemented in thefrontends/sklearn/metrics
module.Benefits
Testing
Conclusion
The addition of the F1 score function enriches the Ivy metrics module and bridges the gap between Ivy and Scikit-learn metrics, fostering a more seamless user experience. We welcome feedback and contributions to further refine this feature.
Looking forward to the community's input on this enhancement!
Closes #
Checklist