Example with ranking metrices
See original GitHub issueDescribe the issue linked to the documentation
Some of the metrices in #2805 were implemented in #7739.
Suggest a potential alternative/fix
It would be nice to add (to) an example the usage of those ranking metrices with the addition of, e.g., kendall’s tau and spearman’s rho:
from scipy.stats import kendalltau, spearmanr
from sklearn.metrics import make_scorer
kenall_tau_score = make_scorer(kendalltau)
spearman_rho_score = make_scorer(kendalltau)
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (8 by maintainers)
Top Results From Across the Web
Evaluation Metrics for Ranking problems: Introduction and ...
Example : AP Calculated using the algorithm · At rank 1: RunningSum = 0 + 1 1 = 1 , CorrectPredictions = 1...
Read more >20 Popular Machine Learning Metrics. Part 2: Ranking ...
Some of the popular metrics here include: Pearson correlation coefficient, coefficient of determination (R²), Spearman's rank correlation ...
Read more >Metrics for evaluating ranking algorithms - Cross Validated
Three relevant metrics are top-k accuracy, precision@k and recall@k. The k depends on your application. For all of them, for the ranking-queries ...
Read more >Search, Ranking & Evaluation Metrics - LinkedIn
The goal of this post is to give high level introduction to search process, ranking and then different evaluation metrics available.
Read more >MRR vs MAP vs NDCG: Rank-Aware Evaluation Metrics And ...
The MRR metric does not evaluate the rest of the list of recommended items. It focuses on a single item from the list....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@rth I agree…since having a Recommendation Engine example seemed to be in the interest of multiple people, I got to that first. The other points are also valid but (as you mentioned) not necessarily well-combineable with rec engines
As far as I know ranking is not necessarily a primary evaluation metric in recommendation (see e.g. lightfm.evaluation): one cares more about how many relevant predictions are made in the first N, instead of whether it’s first or third. Though I agree that it would still be be good to have a recommendation example, but maybe more for top_k_accuracy_score metric (which also doesn’t have any examples apparently)?
For DCG and NDCG what comes to mind is more a search or directly a ranking problem. There are a few ranking problems on OpenML maybe we could pick one (or find some other open dataset and put it there)? Though of course we can also illustrate them on a recommendation example.
A side comment that https://www.openml.org/d/40916 looks interesting, but maybe too political. I do wonder how does the partial dependence plot of “Dystopia” wrt “Happines” looks like 😃