Recommendation System(Part-1)
A recommender system is a system used to predict ratings of an item given by a user and recommend items
Types of Recommender System:
- Content Based Filtering
- Collaborative Filtering
Content Based Filtering
Track what the user consumes
Recommend items similar to those consumed in past
Need item description
Narrow vision
Good for new items
Collaborative Filtering
Track all the users consumption
No need for item description
Recommend items consumed by users who have a similar consumption pattern to the user of interest.
More serendipity
Recommend based on the neighbourhood of user
Hybrid Filtering
Combines the best of two
Recommendation can be viewed as a rating prediction problem.
Accuracy function is computed using metrics such as:
- Mean square error MSE: ( (r jk - f (uj - ik))2 ) / n
- Mean absolute error MAE: ( |r jk - f (uj - ik)| ) / n
We create item rating matrix (R), the data
Where the rows refer to the users and columns to items, the intersection of each row and column tells the rating given by a particular user to an item, a blank column is due to no rating.
This method doesn’t consider the fact that ratings are contextual, as preferences change when one is with family or friends.
These unobserved ratings results in sparseness in the data. In actuality there is a lot of sparse data as getting the rating for each item by each user is not possible. So filling these values is necessary.
User based Collaborative Filtering
In this all the neighbours of active user are considered and the cosine similarity of the active user is calculated with all the neighbours as
similarity(a,b) = Ua . Ub |Ua| |Ub|
The rating is calculated as:
Rating = similarity(a,K) * rating(K) similarity(a,K)
Rather than using weighted rating, adjust ratings based on user rating scale because :
The users have different rating scales (some are harsh :)
If only one user has rated the item, then the predicted rating will be the same no matter the similarity.
Comments
Post a Comment