Recommender systems in practice
A short and superficial introduction
Introduction to the world of recommender systems
The digital world around us is pouring an unprecedented and ever-increasing amount of information on us, from which it is a real challenge to sort out the elements that matter to us.
Since ancient times information has been recognized as representing value. Today, due to the excessive amount of it, the real value and service is to be able to sort the relevant information for the user. The purpose of recommender systems is precisely to filter this information flow, thus helping us to deal only with content relevant to us, minimizing the time spent on it.
With the proliferation of smartphones, this help has become constantly available to us in many areas. Based on my personal experience, this comfort is not yet sufficiently available to us in many aspects of our lives, including, for example, trade, tourism, etc.
In terms of its function – in an extremely simplistic way – the main purpose of the recommender system is to sell more products. This can result in selling tangible products, or even in how much time someone spends browsing the content of a particular website, or how many people click on an article. The purpose of the system is to work out the users’ preferences during interacting with them and “understand” what they need. By increasing their satisfaction, consumer trust and loyalty can be built which can create a profitable cooperation in the long run. Building sufficient confidence and getting to know the user also allows to sell a much broader range of products through a given channel. If we don’t know someone, it’s less risky to offer the most popular products only, which makes it harder to make a mistake. However, for a well-known user a product neglected by the masses can be offered if it fits into his or her profile.
In addition to the usual recommendation function there can be many other special tasks for a system: not only can it sort items based on their perceived relevance, but it can also look for all “good” or “useful” items. It can recommend a series of items that can be useful to the user. For example, after ordering a textbook, it may be interesting for the customer to obtain an additional body of knowledge based on it. Often not a series of items is needed, but rather a product bundle, which can be useful for us combined. For instance, if we are about to travel, typically we need attractions, restaurants, accommodation, airline tickets, and all these can be obtained in one package. Selling such offers in bundles can change our basic concept, and our first decision will not be about our destination, that will be only a consequence of the former. Sometimes the task of recommender systems only extends to help us find a – credible – opinion leader on a particular subject, who will be able to provide us with satisfactory information or help us to make our decision.
Types of recommender systems
The basic condition for the operation of recommender systems is that we have data on users, recommended items and transactions. Depending on the type of recommender system, there are models which use little data, while some are very data intensive. A profile describing user preferences and other circumstances has to be set up according to the requirements of the model. This can consist of the user’s self-reported parameters, demographic data, reviews for certain items, or simply selecting (purchasing) items. The description of the selectable elements can be easily characterized by its own parameters, such as the genre, age, theme, author, etc. of a book. There are more complex topics like music, travel, an electronics item or another user on the dating site. In addition to these it is also important to describe the cost of the item and the usefulness associated with its consumption or possession.
Transactions not only mean interaction between users and elements – such as giving reviews -, but also any interaction – used by the recommendation system’s model – between the user and the computer, such as the user’s browsing habits on the website. Evaluations can be interpreted widely depending on the model. They can be traditional numerical ratings, or binary – yes/no, bought/did not buy – ordinal ratings (e.g.top 5). Some systems also provide the option to use tags, which can be used as stickers to label items. For example, in the case of a book review, in addition to numerical evaluation, we can detail our problems – for example too long, boring, or bad-ending – and we can also tell the reason behind our positive review (e.g. unputdownable, rich in turns, etc.).
Those who have liked similar things in the past, they will like similar things in the future . Perhaps this is the easiest way to describe the fundamental assumption of the collaborative filtering regarding users. The method attempts to profile users by their actions, and then captures the similarity between the profiles created using various tools. Items that a specific user liked are then recommended to others who have been identified as similar. The huge advantage of the solution is that it does not require the understanding of the product to be recommended to make suggestions to users, as it is fully based on the understanding of the users. However, one of the serious drawbacks is that in the absence of – a relatively large amount – initial information about user behaviour the system is inoperable. This is what the literature calls the “cold start” problem.
Rong et al. proposes a Monte Carlo algorithm to bridge the initial lack of information, which is effectively used to pre-calculate user similarities and to pre-evaluate their later assessments .
Another best practice is to take into account user demographics when making suggestions. Demographic filtering is often classified as an independent procedure , but I would prefer to identify it as one of the subtypes of collaborative filtering, given that this is also based on exploring similarities between users, with the difference that the basic assumption here primarily is that people with similar demographic characteristics (age, gender, education, etc.) have similar interests. Building on this hypothesis in itself obviously offers very little success, and rather the compulsion – specifically the lack of initial information – gives birth to the solution, but as additional information it can lead to significant improvements in hybrid recommender systems.
Of course, the initial lack of information as soon as possible is attempted to be reduced explicitly (favourites, searches, choice between two items, ranking of items, rating of items, etc.) and implicitly (analysing the user’s social network, mouse movement heat map, time spent viewing each item, list of items previously viewed or even purchased).
Even with the above techniques, it is very difficult to build a well-functioning recommender system in some areas, where there is a very wide variety of products (elements) compared to the number of users, since here certain product types receive very few ratings, which degrades the accuracy of the recommendations and many products do not receive ratings and will therefore not be on the list of recommendations offered to users. Based on the above, it is clear that the development of sophisticated recommender systems (worsened with high user and product numbers) poses a serious challenge in addition to the computing capacity of current computers.
This class of recommender systems has its roots in information filtering and information recovery systems. Its fundamental assumption is that what users liked in the past, they will like similar products in the future as well. So for this reason, it is necessary to understand the products and to grasp their characters, and compress it into properties and categories.
The thought process is familiar from matrix factorization procedures. As we have explored there using algorithms the (hidden) properties affecting the perception of products, we reveal them here as well, or assume that they are given. While this was a dimension reduction procedure for collaborative filtering, for content-based filtering to describe the characteristics of the products it is a prerequisite. This fundamentally makes it difficult to use content-based filtering procedures. During the 1999 Music Genome Project, more than 400 of these features were defined for music and Pandora Radio, which uses purely content-based filtering, is based on this knowledge about music .
Of course, content-based filters are also successfully applied in many other areas, such as IMDb and Rotten Tomatoes movie review sites. It’s important to clarify the difference between product-based filtering and content-based filtering, the former looks at the similarity between the products’ vectors made up of user-defined reviews, while content-based filtering looks for similarities between illustrating vectors in the space of properties describing products.
The model describing the recommendation system requires the following elements:
- Product profile: An ordered series of factors and properties that make up the character of a product, most often specified by a vector, and the numeric value indicated at the location of each property value indicates the relevance of that property to the product.
- User profile: For each user we also vectorize how important each property is to them (thus writing down the user’s preferences). We can collect this information directly from the user, by collecting statements on the importance of particular properties, or indirectly in connection with the review of certain products. If they review the product, the property vector describing the product – taking into account the rating as a weight – contributes to the user’s profile vector.
- Algorithms searching for similarities: If we’ve already defined the product and user profiles (both specified in the vector space of the properties), then with an algorithm identifying similarities we can give the user the items they’re most probably going to like.
The filtering solutions discussed earlier face a number of limitations, so they try to combine them to eliminate these during the recommendations to take advantage of certain synergies. For example, the recognized initial information difficulties of the collaborative techniques can be overcome by content or knowledge-based filtering process, and collaboration filtering can be used to find similar users who help refining suggestions, or with this we can even make recommendations that employing a content-based approach we would hardly have been able to do.
The systems discussed above can have a number of other functions in addition to what has been described, to help navigating everyday life. Yet if I could only highlight one reason why this practical area is worth addressing, I recall a case that had a great impact on me: The U.S. supermarket chain Target has been operating a recommender system implemented several years ago, which made recommendations to its customers with quite high accuracy. Based on a schoolgirl’s purchases, the system detected that their consumer was most likely pregnant (as she began to show consumption habits that other pregnant women), so she received recommendations about products for expectant mothers. In their first outcry the girl’s parents wanted to sue the company, but quickly cancelled their intention after facing the fact that the system was not wrong . The lesson of this story is that a well-calibrated model can know more about us than we do, which is hardly reassuring.
•  Recommendation system – https://en.citizendium.org/wiki/Recommendation_system
•  Y. Rong – X. Wen – H. Cheng (2014): A Monte Carlo Algorithm for Cold Start Recommendation, WWW’14 Proceedings of the 23rd international conference on World wide web, pp. 327-336.
•  M.H. Ferrara – M. P. LaMeau (2012): Pandora Radio/Music Genome Project. Innovation Masters: History’s Best Examples of Business Transformation. Detroit. pp. 267-270. Gale Virtual Reference Library.
•  How Target Figured Out A Teen Girl Was Pregnant Before Her Father Did – https://www.forbes.com/sites/kashmirhill/2012/02/16/how-target-figured-out-a-teen-girl-was-pregnant-before-her-father-did/
Recommender systems in practice
This article was written by: Sándor Apáthy
Onespire Data Science and Analytics Services
Discover our other posts in this category!
Supporting the data cleansing processes of data migration projects using the KNIME Analytics Platform
In a pilot project with MINDSPIRE, we have examined which tool could be used without developer knowledge to effectively support data cleansing tasks during data migration projects.
In our daily lives we are getting into decision-making situations countless times, often even unnoticed. In our post we take a quick look at the history of the recommender systems.
Did you know why most digital transformation projects born dead? Would you like to understand, what the key factors are to ensure successful transformation at any organization?