AstraZeneca / rexmex

A general purpose recommender metrics library for fair evaluation.
https://rexmex.readthedocs.io/
278 stars 25 forks source link

Add mean rank and geometric mean rank #23

Closed cthoyt closed 2 years ago

cthoyt commented 2 years ago

Summary

This PR follows the style of the implementation of the mean reciprocal rank to add an implementation of the rank helper function, the mean rank, and the geometric mean rank (originally described here).

Changes

Questions

codecov-commenter commented 2 years ago

Codecov Report

Merging #23 (5a4b281) into main (6d166ff) will increase coverage by 0.00%. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main      #23   +/-   ##
=======================================
  Coverage   99.86%   99.87%           
=======================================
  Files          15       15           
  Lines         754      787   +33     
=======================================
+ Hits          753      786   +33     
  Misses          1        1           
Impacted Files Coverage Δ
rexmex/metrics/ranking.py 100.00% <100.00%> (ø)
tests/unit/test_metrics.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 6d166ff...5a4b281. Read the comment docs.

benedekrozemberczki commented 2 years ago

Looks great @cthoyt! Thank you - we will add you to the bib.