Now that you have an idea about content-based filtering, it’s time to switch to the second most common type of filtering: collaborative filtering. This is based on the simple premise that what a user is more likely to prefer is highly correlated to what the other users similar to him/her have liked in the past.
You predicted the ratings that Nikhil is likely to give to some movies that he has not yet seen. Note that these movies should have been seen by the users similar to him, otherwise weighted average would not be possible. To summarise the algorithm of user-based filters:
Note that there are various similarity measures, one of which you'll see in the following question. However, before going on to the question, you may revise the formula for calculating the magnitude of a vector. For a vector v = (a,b), the magnitude is given as