Evaluation measures for Information Retrieval. Please call this library "I-R-met".
Install via pip
$ pip install irmet
- NDCG (Normalized Discounted Cumulative Gain)
- AUC (Area Under the Curve)
from irmet import NDCG
# <scores>
# ↓ ↓ ↓ ↓ ↓
ranking_list = [2, 0, 1, 0, 1]
# <rank> → 1 2 3 4 5
ndcg_score = ndcg(ranking_score, topk=3)
# >>> 0.8472668887613066
WIP.