Hi I am working on a movie recommendation system and I have to find alikeness between the main user and other users. For example, the main user watched 3 specific movies and rated them as 8,5,7. A user who happened to watch the same movies rated them as 8,2,3 and an another user of the same kind rated those movies as 7,6,6 and some other user only watched first two movies and he rated them as 8,5. Now the question is to which user the main user is close. I tried to come up with functions, but they are prone to fail. Can you help me?

  • $\begingroup$ In low dimensions (here you have 3) you can try Euclidean distance to rank similarity. I.E. sqrt((8-8)^2 + (5-2)^2 + (7-3)^2) to check the similarity between the main user and the first one in your example. $\endgroup$
    – ZWang
    Commented May 7, 2021 at 2:41
  • $\begingroup$ @Zwang what about third user sir? $\endgroup$
    – OnurTR
    Commented May 7, 2021 at 3:32

1 Answer 1


Use euclidean distance 1

$d(p,q) = \sqrt{\sum_{i=1}^{n}(q_i - p_i)^2}$

and check main user vs all other users.


Your Answer

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

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