You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I am not mistaken, I don't think that we have any example tackling the problem of recommendation. It would be nice to have a full example with a predictive model and the way to evaluate it?
@acse-srm3018 are you still working on this? If you have a draft, feel free to open a draft PR, mark it WIP, and ask for feedback if you need any help.
You'd need to add a whole new example @sveneschlbeck , I wouldn't say it's the easiest issue to work on. You need to familiarize yourself with the structure of the examples under the examples/ folder, and add a new one in the appropriate place there.
I don't think that we have any example tackling the problem of recommendation. It would be nice to have a full example with a predictive model and the way to evaluate it?
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.
Just wanted to quickly confirm the direction before jumping in.
It seems like there are actually two separate things we have here, and maybe it’s worth splitting this into 2 different issues:
A recommendation example (something simple and educational, maybe video/movie based using cosine similarity) - this would flow more naturally into top_k_accuracy_score, which is usually what readers might have in mind and expect. Right now, k score doesn’t have any detailed example or walkthrough either, so we could build something that covers both.
A pure ranking example - where it makes more sense to use kendall or spearman for evaluation. These metrics are usually used in search, not so much in recommenders so a separate item might make sense.
My suggestion: I could start with the recommender + top_k_accuracy_score example first, since it would be what many users might expect when they come to this topic.
After that, I can follow up with a ranking example using kendall and spearman.
Let me know what direction makes more sense - happy to align on whatever would be most valuable for the readers!
@StefanieSenger in the meantime I will get started with laying down a rough structure for the example, dataset etc. (stuff that would remain slightly constant irrsepective of the approach we take for this one)
Hi! I'd like to work on this. My plan is to write an example that trains a model on a ranking-style dataset and then evaluates it using NDCG, Kendall's tau, and Spearman's rho, showing when you'd use each one. Let me know if this direction makes sense and I'll get started!
Hi @StefanieSenger@lorentzenchr — opened #34427 for #21138 (NDCG / Kendall's tau / Spearman's rho ranking example). Checks are green and it's ready for review whenever you get a chance. Happy to adjust anything based on feedback — thanks!
Activity
glemaitre commentedon Sep 24, 2021
If I am not mistaken, I don't think that we have any example tackling the problem of recommendation. It would be nice to have a full example with a predictive model and the way to evaluate it?
acse-srm3018 commentedon Sep 27, 2021
take
adrinjalali commentedon Oct 12, 2021
@acse-srm3018 are you still working on this? If you have a draft, feel free to open a draft PR, mark it WIP, and ask for feedback if you need any help.
adrinjalali commentedon Nov 8, 2021
You'd need to add a whole new example @sveneschlbeck , I wouldn't say it's the easiest issue to work on. You need to familiarize yourself with the structure of the examples under the
examples/folder, and add a new one in the appropriate place there.2 remaining items
rth commentedon Nov 8, 2021
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 :)
shivamchhuneja commentedon Jun 4, 2025
Hi!
Happy to pick this up.
Just wanted to quickly confirm the direction before jumping in.
It seems like there are actually two separate things we have here, and maybe it’s worth splitting this into 2 different issues:
A recommendation example (something simple and educational, maybe video/movie based using cosine similarity) - this would flow more naturally into top_k_accuracy_score, which is usually what readers might have in mind and expect. Right now, k score doesn’t have any detailed example or walkthrough either, so we could build something that covers both.
A pure ranking example - where it makes more sense to use kendall or spearman for evaluation. These metrics are usually used in search, not so much in recommenders so a separate item might make sense.
My suggestion: I could start with the recommender + top_k_accuracy_score example first, since it would be what many users might expect when they come to this topic.
After that, I can follow up with a ranking example using kendall and spearman.
Let me know what direction makes more sense - happy to align on whatever would be most valuable for the readers!
@StefanieSenger
StefanieSenger commentedon Jun 4, 2025
Let's tag @lorentzenchr here, so he can evaluate your approach.
shivamchhuneja commentedon Jun 6, 2025
@StefanieSenger in the meantime I will get started with laying down a rough structure for the example, dataset etc. (stuff that would remain slightly constant irrsepective of the approach we take for this one)
shivamchhuneja commentedon Jun 9, 2025
Hey, just getting this thread going again
adrinjalali commentedon Jun 11, 2025
@shivamchhuneja feel free to fire up a pull request with your ideas and we can take the idea from there.
shivamchhuneja commentedon Jun 12, 2025
@adrinjalali thanks, sounds great, will setup the base ideas in a PR within the coming week :)
Arraddhyyad commentedon Jun 4, 2026
Hi! I'd like to work on this. My plan is to write an example that trains a model on a ranking-style dataset and then evaluates it using NDCG, Kendall's tau, and Spearman's rho, showing when you'd use each one. Let me know if this direction makes sense and I'll get started!
shivamchhuneja commentedon Jun 17, 2026
imo it sounds good @Arraddhyyad - just check once more if this was already picked up by someone or not once
Arraddhyyad commentedon Jun 23, 2026
Confirmed! no branches or PRs in the Development section. I'll get started :)
Arraddhyyad commentedon Jul 9, 2026
Hi @StefanieSenger @lorentzenchr — opened #34427 for #21138 (NDCG / Kendall's tau / Spearman's rho ranking example). Checks are green and it's ready for review whenever you get a chance. Happy to adjust anything based on feedback — thanks!