Have you ever given a thought how e-commerce websites show you products with “Customer who bought this also bought this” or how Netflix recommends movies based on your interest or how Facebook discovers “Person you may know” list?
Let’s look at the below pictures:
Amazon: “When you buy a book”
Netflix: “Other Movies You Might Enjoy”
You can see in these pictures that different products are getting recommended on the basis of your behavior and content. How?
You might have heard the term “Recommendation Engine”.
Recommendation engines have changed the way websites interact with visitors. Rather than providing a static experience in which users search for and potentially buy products, recommender engines personalize user experience by recommendation of products or making suggestions on the basis of past purchases, search and other behavioral traits.
Recommendation engines are algorithms for filtering and sorting items and information. These use opinions of the user community to help individuals in that community to discover interesting and relevant content from a potentially overwhelming set of choices.
One can build recommendation engines using different techniques or ensemble of techniques. Some popular techniques are:
Content-based recommendation engine works with existing profiles of users. A profile has information about a user and their taste. Taste is based on user rating for different items. Generally, whenever a user creates his profile, Recommendation engine does a user survey to get initial information about the user in order to avoid new user problem. In the recommendation process, the engine compares the items that are already positively rated by the user with the items he didn’t rate and looks for similarities. Items similar to the positively rated ones will be recommended to the user. Here, based on user’s taste and behavior a content-based model can be built by recommending articles relevant to user’s taste. This model is efficient and personalized yet it lacks something. Let us understand this with an example. Assume there are four categories of news A) Politics B) Sports C) Entertainment D) Technology and there is a user A who has read articles related to Technology and Politics. The content-based recommendation engine will only recommend articles related to these categories and may never recommend anything in other categories as the user never viewed those articles before. This problem can be solved using another variant of recommendation algorithm known as Collaborative Filtering.
The idea of collaborative filtering is finding users in a community that share appreciations. If two users have same or almost same rated items in common, then they have similar taste. Such users build a group or a so-called neighbourhood. A user gets recommendations for those items that user hasn’t rated before but was positively rated by users in his/her neighbourhood.
Collaborative filtering has basically two approaches:
- User Based Approach
In this approach, Items that are recommended to a user are based on an evaluation of items by users of the same neighbourhood, with whom he/she shares common preferences. If the article was positively rated by the community, it will be recommended to the user. In the user-based approach, articles which are already rated by a user, play an important role in searching for a group that shares appreciations with him/her.
- Item Based Approach
Referring to the fact that the taste of users remains constant or change very slightly, similar articles build neighbourhoods based on appreciations of users. Afterwards, the system generates recommendations with articles in the neighbourhood that a user might prefer.
Let’s try to understand above picture. Let’s say there are three users, A, B & C. In user-based CF, user A and C are similar because both of them like Strawberry and Watermelon. Now user A likes Grapes and Orange too. So user-based CF will recommend Grapes and Orange to user C.
In item-based CF, Grapes and Watermelon will form the similar items neighbourhood which means irrespective of users, different items which are similar will form a neighbourhood. So when user C likes Watermelon, the other item from the same neighbourhood i.e Grapes will be recommended by item-based CF.
For better results, we can combine collaborative and content-based recommendation algorithms. Netflix is a good example of a hybrid recommendation engine. It makes recommendations by comparing the browsing and search habits of similar users (i.e. collaborative filtering) as well as by offering movies that have similar characteristics to a movie which a user has rated highly (content-based filtering).Using hybrid approaches we can avoid some limitations of pure recommender systems, like the cold-start problem. Hybrid approach can be implemented in different ways:
a. Separate implementation of algorithms and joining the results.
b. Utilize some rules of content-based filtering in collaborative approach.
c. Utilize some rules of collaborative filtering in content-based approach.
d. Create a unified recommender system that brings together both approaches.
One such hybrid approach is Context-aware Approach. Context is the information about the environment of a user and the details of situation the user is in. These details can play more significant role in recommendations than ratings or popularity of articles. Some recommendations can be more suited to a user in evening and may not match user preference in morning at all. User may like to do one thing when it’s cold and completely different when it’s hot outside. Recommender engines that pay attention and utilize such information in generating recommendations are called context-aware recommender systems.
Addressing Cold-Start Problem
It’s difficult to generate recommendations for new users when their profile is almost empty and taste and preferences are unknown. This is called the cold start problem. We can do following things to overcome this challenge:
- Recommend subset of most popular articles from various categories to the user.
- A better approach would be a hybrid one like context-aware approach, we can initially collect some data about the user’s environment, situation etc. (maybe by using cookies data). And then recommend the articles after having some information of the user.
We have thrown light on some popular techniques in building recommendation engines. There are some well- known challenges in building these systems. i.e. users can exploit recommendation system to favour one product over another- based on positive feedback on a product and negative feedback on competitive products. A good recommender system must address these issues.
I hope you like this post In next post I will cover recommendation engines in depth. Feel free to reach out to me at [email protected] for more information.