-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ranking Metrics - Better Precision/Recall/MRR calculation (#1492)
## Description This PR: - Makes the metrics calculation (other than NDCG and AP, which are already correct) correct for boolean and numeric scenarios - Changes ndcg from a non-mergeable batch metric to a mergeable row-wise metric - Corrects top_rank to return None instead of 0 when there is no relevant item (since lower is better for top_rank, assigning a 0 is not correct) - Changes MRR from a non-mergeable batch metric to a mergeable row-wise metric (and renamed from `Mean Reciprocal Rank` to `Reciprocal Rank`) - Refactors the code to group row-wise statistics calculations functions After these changes, the only metric that makes the ranking metrics non-mergeable is `accuracy_k` - [x] I have reviewed the [Guidelines for Contributing](CONTRIBUTING.md) and the [Code of Conduct](CODE_OF_CONDUCT.md). --------- Co-authored-by: felipe207 <felipe@whylabs.ai>
- Loading branch information
1 parent
db15e49
commit 538eb05
Showing
3 changed files
with
137 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.