Prediction in Collabrative filtring

well we have trained model on user rates of movies without know the features of this movie then how can we predict a rate of this user for a new movie i mean that the movie has’t features how the algorithm will predict the rating ?

Hi @Ibrahim_Mustafa,

If I understand you correctly, you were asking about a new movie that has never been rated and never been used in training of the collaborative filtering model.

If you check out the Course 3 Week 2 video about mean normalization, it tells us how we can change a new user into an “average user” by imputing all the missing ratings with the averaged ratings from existing users.

In principle, you might apply the same technique for a new movie to make it an “average movie”.

What this technique can do is it makes a new user or a new movie be able to go into the collaborative filtering model and get some predictions.

What this technique can’t do is that, it won’t make any difference for the new users because all new users are looked as the same average user. Similarly, all new movies are looked as the same average movie. It is a limitation when we have no information (rating) at all about an user or a movie. It is also just an assumption that all of our new users or new movies are average users or average movies when we know nothing about them at all.

It is therefore that if our system is expected to make good recommendations even for new users / new movies, we cannot just rely on collaborative filtering. Instead, we might want to also have a content-based filtering model (which is discussed also in Course 3 Week 2) that bases recommendation on the movie’s or the user’s content. Examples of the content can be the movie’s genre, or the user’s country which can be available even if they are new.

Cheers,
Raymond

1 Like

This assignment is just a demonstration. It’s not a complete recommender system.

If you wanted to use this for real work, you might consider not making recommendations for a new movie until it had accumulated a few reviews.

1 Like

but if that movie is rated by other users how the algorithm will recommend that movie to the user had’t rate that movie before?

The ratings are based on similarity between movie ratings from other users. That’s the core concept of this assignment.

1 Like

Exactly as Tom explained, but let me also give you an example, @Ibrahim_Mustafa.

If user X has rated movies A, B, C, D, E all with the highest rating, but never rated movie F, and if there are 15 other users who have rated movies A, B, C, D, E and F all with the highest rating, then it is likely that the recommender will recommend movie F to user X.

User X has high similarity to those 15 users, thus the recommender will think that X is going to like movie F too.

Cheers,
Raymond

1 Like

ok to make sure that i understand
first the algorithm will fed movies rated by users then the algorithm
will calculate weights for each user and try to figure out features of movies depending on the size of features i give and then if a user has rated movies and the algorithm know his weights then the algorithm will apply linear regression model
to figure which movies that we can recommend to this user
but the movies that will be recommended must be trained by the algorithm
in short i mena that the algorithm is try to know how a user might rate a movie he did’t seen and if this predicted rate is high it will recommend it

Hello @Ibrahim_Mustafa

Yes, we give the algorithm the size of feature for both user and movie, and the algoirhtm figure out the weights (the features)

Yes

Yes, so that the movie has its own movie feature vector. All feature vectors are trained by the model.

Yes.

Cheers,
Raymond

1 Like

thank you to much and last question
If user X has rated movies A, B, C, D, E all with the highest rating, but never rated movie F, and if there are 15 other users who have rated movies A, B, C, D, E and F all with the highest rating, then it is likely that the recommender will recommend movie F to user X.

User X has high similarity to those 15 users, thus the recommender will think that X is going to like movie F too.

in this example you explained
i think this concept is not explained in videos we just learn how to get weights of users and features of movies depending on rates
and when we recommend we use user weight and multiply it with all features of movies and just recoomend the high rates

Hello @Ibrahim_Mustafa,

You are welcome! My example can give you some idea of how a collaborative filtering model works. However, what if we have another 15 users who have rated movies A, B, C, D, E with the highest rating, but they all rated F with the lowest rating?

Here is a summary of the users:

15 users: A, B, C, D, E => highest; F => highest
15 users: A, B, C, D, E => highest; F => lowest
user X: A, B, C, D, E => highest; F => never rated.

Now, what would we expect the model to tell us about user X’s preference on movie F? Perhaps the model will say “averaged” instead of “highly rated”, right?

I can easily change the course of my previous example by adding 15 more users that behaves in an opposite manner. However, the core idea here does not change: the prediction about user X is related to users who are similar to user X, and that “similarity” is determined not just by what movies X has rated, but also how X has rated those movies.

We can continue to add users to keep changing the course of the model’s behavior on user X, and it is exactly the case in the real-world data because real-world data is supposed to be more complicated and irregular. This complexity makes it more difficult to speak firmly what user X will like by just inspecting the data.

Therefore, my example is just a very simple example.

Cheers,
Raymond

1 Like