0
$\begingroup$

I would like to compare recommendations methods using NDCG metric on MovieLens dataset.

In ranking problem, the goal is to rank items based on their relevance for user. Ranking models can be learned based on ratings matrix, where each user rates small subset of all items. Ratings for other items are unknown.
Collaborative Filtering methods can be used to create model which generalize training datasets and predict ratings for unrated items.

Let's consider following example on dataset consisted of 5 movies. User A rated only 3 movies:

  • movie 1 - 5 stars
  • movie 3 - 3 stars
  • movie 4 - 2 stars

Model predict following results

  • movie 1 - 5 stars
  • movie 2 - 4 stars
  • movie 3 - 3 stars
  • movie 4 - 2 stars
  • movie 5 - 1 stars

How NDCG@3 should be calculated in this example ? Movie 2 get second best score but it has not been rated by user although it's highly relevant for user A based on other user ratings. Giving movie 2 1 star rating as ground true penalized model because it predicted highly relevant movie which was not rated by user.

Many papers measure model performance on MovieLens using NDCG, but I have not found details how NDCG is calculated. What is the best practice for solving this problem? Is it good idea to estimate unknown rating value based on movie ratings median or average ?

$\endgroup$
3
  • $\begingroup$ Please provide more details and a possible snippet of the work you have already done. Also please stick to one question or a single question with a few sub-topics. $\endgroup$
    – Academic
    Nov 14, 2020 at 19:28
  • $\begingroup$ @SoumyaKundu I have just edited orginal question $\endgroup$ Nov 14, 2020 at 20:12
  • $\begingroup$ Great ! :) Thanks a lot! $\endgroup$
    – Academic
    Nov 15, 2020 at 11:10

1 Answer 1

0
$\begingroup$

Movie 2 get second best score but it has not been rated by user although it's highly relevant for user A based on other user ratings.

The issue with this is that you're injecting your opinion into what items are relevant to user A.

How NDCG@3 should be calculated in this example ?

You cannot evaluate your model on items the user has not rated. Generally with explicit feedback data you want to ignore missing values. Imputation may be possible, but it is more challenging and not commonly used. The correct modeling pipeline is to first make a training & testing set. Train your model on the training set and then for each user rank their known items that are present in the testing set (source: p.g. 24). Then you can compute various cutoff-sensitive metrics.

In your example, you should not be predicting ratings for movie 2 or 5. If your training set was movie 1 & movie 3 then you would make predictions for movie 4 -- obviously in a real application you should have more data so that there is more than one example in your test set.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.