Recommendation System: Content based (Part 1)

Arsalaan Javed
Analytics Vidhya
Published in
6 min readApr 21, 2020

--

This article contains detailed implementation steps of CBRS in python without any external libraries from scratch.

Two famous methods for recommendation system are content-based and collaborative filtering. In this article, I will focus upon the implementation details of content-based recommender system and in part 2 of this article, I will explain about collaborative filtering approach.

The main idea of CBRS revolves around recommending the user with similar items that were rated highly by him/her in the past.

For example, in fig 1 if a user likes items with color (the common attribute found here) red then the recommender system will recommend the user with more items having color red and not emphasizing over the shape of the items.

Fig. 1

Content based recommender doesn’t focuses over the ratings of other users and this enables this model to recommend to users with unique taste and to recommend new or unpopular items. The word “content” here refers to the attributes of the item that a user has liked or disliked for example for a movie it’s genre and type (genre: action, adventure and type: TV series) etc.

There are two main things you need in order to recommend any item to a user: item profile and user profile. Let’s dig into the implementation part now.

--

--

Arsalaan Javed
Analytics Vidhya

Software Engineer by profession at Microsoft Writer by hobby