Machine Learning in Recommendations Systems

Recommendation systems have become very important in recent years. They now represent a huge opportunity for e-commerce, especially with Big Data. By working with large amounts of data and introducing sophisticated algorithms, online stores should see their conversions increase with current referral systems. You have no doubt already seen appear on your screens classic formulas such: X who bought this article have also bought … or: it might also interest you… when you shop online. These tips, adapted to the user\’s individual preferences, are the result of sophisticated calculations and algorithms.
Recommendation systems are commonly used in connection with artificial intelligence. Their ability to provide global insight, predict events and highlight correlations helps explain their use in artificial intelligence. In addition, machine learning techniques are frequently used to create recommendation algorithms. Among all these techniques I am going to present the Content Based Filtering, Collaborative Based Filtering, Hybrid Content-Collaborative Based Filtering, k-mean clustering and Naive Bayes classifier.
Keywords: Machine Learning, Recommender System, Naive Bayes Classifier, K-means clustering
Introduction
A recommendation system is an application intended to propose to a user, items likely to interest him according to his profile. Recommendation systems are used in particular on online sales websites. They allow e-merchants to automatically highlight products that interest visitors. The selection of displayed products is then customized according to various criteria in order to increase the turnover generated by the sales. Amazon is known to use a powerful recommendation system but the practice is becoming widespread and is no longer reserved for large e-commerce sites. The recommendation systems can also be used to enrich the user experience, proposing in particular on a news site articles likely to interest a reader, or on a music site, a musical selection likely to appeal to the user.
Recommendation systems are used in many information-based companies such as Google (J. Liu, Dolan, & Pedersen, 2010), Twitter (Ahmed et al., 2013), LinkedIn (Rodriguez, Posse, & Zhang, 2012), and Netflix (Steck, 2013). The field of RS has its origins in the mid-1990s with the introduction of Tapestry (Goldberg, Nichols, Oki, & Terry, 1992), the first RS.
As the Recommendation system field evolved, researchers studied the use of algorithms from machine learning, an area of artificial intelligence. Machine learning has been studied since the late 1950s (Martens, 1959), with the emergence of the field of artificial intelligence.
Machine learning algorithms are being used in recommendation systems to provide users with better recommendations. However, the
machine learning field does not have a clear classification scheme for its algorithms, mainly because of the number of approaches and the variations proposed in the literature. As a consequence, it becomes difficult and confusing to choose a machine learning algorithm that fits one’s need when developing a recommendation system. In addition, researchers may find it challenging to track the use of machine learning algorithms in recommendation systems.
Definition fields
In this section, I give a brief definitions of the fields of recommender systems and machine learning.
Recommendation system
Definition
Recommendation systems is a form of filtering to propose elements of information that will be likely to interest the user according to his profile. For simplicity, a recommendation system evaluates a user\’s level of interest in certain products based on their previous behavior such as their previous orders in the store, and automatically searches for similar and potentially interesting products for them.
Recommendation systems come in a variety of ways. There are some for online shops, streaming services, publications, or any platform offering a large number of objects: either it\’s about books, clothes or films, but where only a small subset may be interesting or relevant to the user. The recommendations make it possible to filter data and to facilitate the access of Internet users by selecting in advance objects among a large mass of confused elements.
Recommendation systems approaches
Although there are many techniques to set up a recommendation system, I chose here to present the three simplest techniques and the most used. First, Content-based approaches, then Collaborative approaches and finally Hybrid approaches.
Content-based approaches
Content-based approaches, also known as content-based filtering, are the first recommendation approaches to emerge. They consist in recommending to the user similar items, from the point of view of their content, to the items he has previously appreciated. Content-based filtering requires a description of the items to be recommended and a knowledge of the user\’s preferences.
The disadvantages of content-based filtering
Content-based recommendation systems have disadvantages, including cold start and over-specialization.
We talk about cold-start when the recommendation system has trouble recommending items to a user who has consulted and noted few items (new user for example). Most often, this problem is bypassed by using demographic information from users. In fact, users belonging to the same age group and having completed a more or less similar profile may have the same interests. Therefore, it is relevant to use this information. Other systems prefer to wait for users to write enough items before offering them recommendations.
Over-specialization means that the recommendation tends to always focus on items that are very similar in terms of their characteristics. For example, a book recommendation system could only offer books by the same author. In order to overcome this problem, a touch of chance is often introduced into the algorithms using, for example, genetic algorithms. Otherwise, objects that are very different from the habits (or simply history) of the user will never be recommended.
Collaborative-based approach
In the collaborative method, the recommendation is based on the observation of users with similar behaviors. If a user group has in the past been very interested in a particular object, the system will continue to recommend it. Specific information about the object is not necessary here. However, there are many collaborative filtering techniques, they can be divided into two major categories:
Memory Based approaches
Model Based approaches

The disadvantages of collaborative-based filtering
Collaborative filtering also has limitations. Since users are generally reluctant to write down items, the matrix of notes, associating user notes with items, is very sparse. The phenomenon is called the hollow matrix. We can thus find ourselves in a situation where an item is very little evaluated. Or, that it is evaluated only by people with different interests. As a result, it will be difficult to recommend such an item as it will not be among the items appreciated by a certain group of users. In addition, collaborative filtering suffers from cold start from the user point of view, but also from the item point of view. When a new item is entered in the database, no information exists about the users\’ appreciation of it. Therefore, such an article cannot be recommended. To overcome this problem, the hybrid methods, which I will discuss later, have been proposed
Hybrid approach
Defined as a combination of the traditional methods previously presented in order to benefit from the advantages and to overcome their limitations, they are currently the most represented in the literature, particularly because they are judged to be the most effective. For example, item-level cold start of collaborative approaches can benefit from the benefits of content-based approaches. Indeed, in a content-based approach, only the description of the item is used in the recommendation, so there is no need for the item to be noted by a number of users before it can be recommended as is the case in collaborative approaches. A hybrid system is usually organized in two phases:
1. Independently perform item filtering via collaborative methods or content (or others)
2. Combine these sets of recommendations via hybridization methods such as weights, commutations, cascade, etc.

Machine Learning
Definition
Machine Learning is the science of getting computers to act without being explicitly programmed. In the past decade, machine learning has given us self-driving cars, practical speech recognition, effective web search, and a vastly improved understanding of the human genome. Machine learning is so pervasive today that you probably use it dozens of times a day without knowing it [2].
Machine learning is a concept that is becoming more and more talked about in the world of computing, and that relates to the field of artificial intelligence. Still called \”statistical learning\”, this term refers to a process of development, analysis and implementation leading to the establishment of systematic processes. To put it simply, it is a kind of program that allows a computer or a machine an automated learning, so you can perform a number of very complex operations.
The aim is to make the machine or computer capable of providing solutions to complicated problems, by processing an astronomical amount of information. This offers an opportunity to analyse and highlight the correlations that exist between two or more given situations, and to predict their different implications.
Any user of the latest technology benefits from machine learning. Facial recognition technology, for example, enables social media platforms to help users tag and share photos of friends. Optical Character Recognition (OCR) technology converts images of text into moving characters. Recommendation engines, powered by machine learning, suggest movies or TV shows to watch according to the preferences of the user. Autonomous cars that will use machine learning to navigate will soon be available to consumers.
Today, there are a large number of machine learning algorithms proposed in the literature. They can be classified based on the approach used for the learning process. There are four main classifications: supervised, unsupervised, semi supervised, and reinforcement learning [3].

Machine learning approaches

Machine learning approaches
Supervised Learning The first type of classification is called Supervised Learning (Kotsiantis, 2007; D. Zhang & Tsai, 2006), it is sometimes called inductive classification. The machine relies on predetermined classes and on a certain number of known paradigms to set up a classification system based on already cataloged models. In this case, two steps are required to complete the process, starting with the learning stage of modeling the cataloged data. Then, it will be the second stage to rely on the data thus defined to assign classes to the new models introduced in the system, in order to catalog them too.
Unsupervised Learning The other aspect of machine learning includes Unsupervised Learning methods (Celebi & Aydin, 2016), Machine Learning algorithms do not have a training set. They are presented with some data about the real world and have to learn from that data on their own. Here the data collected \”at the entrance\” are not labeled, the objective of the program will therefore be to classify these data into different subgroups «Clustering» so that those that are the most similar or the closest are associated homogeneously and those that are the most distant belong to distinct groups. There is therefore no expert who makes the labels explicit, this method then makes it possible to find structures that are not known to us (they are so-called \”latent\” variables).
Semi-supervised Learning Semi-supervised Learning (Chapelle, Scholkopf, & Zien, 2006; Xu, Mo, & King, 2012) occurs when algorithms work with a training set with missing information. It uses a set of labeled and unlabeled data. It is thus between supervised learning that uses only labeled data and unsupervised learning that uses only unlabeled data. The use of unlabeled data in combination with labeled data has been shown to significantly improve the quality of learning. Another interest comes from the fact that the labeling of data requires the intervention of a human user. When data sets become very large, this operation can be tedious. In this case, semi-supervised learning, which requires only a few labels, is of obvious practical interest.
Reinforcement Learning Lastly, Machine Learning algorithms might have a Reinforcement Learning approach. Reinforcement learning (Sutton & Barto, 1998). Reinforcement learning is the case where the algorithm learns behavior given an observation. The action of the algorithm on the environment produces a return value that guides the learning algorithm.
Reinforcement learning is learning through interaction with the environment and observing the outcome of certain actions. It allows machines to automatically determine the ideal behavior in a specific context, in order to maximize its performance. For that, a simple return of the results is necessary to learn how the machines must act.

The use of machine learning algorithm in recommender systems
Recommendation systems could be managed by machine learning algorithms.
Content-based recommendation
For systems which implements a content-based recommendation approach could use several machine learning techniques, including Naive Bayes algorithm
Naive Bayes Classifier
Naive Bayes Classifier is a popular algorithm in Machine Learning. It is a supervised learning algorithm used for classification.
These approaches generate a probabilistic model based on previously observed data. The model estimates the “a posteriori “probability, P(c|d), of document d belonging to class c. This estimation is based on the a priori probability, P(c), the probability of observing a document in class c, P(d|c), the probability of observing the document d given c, and P(d), the probability of observing the instance d. Using these probabilities, the Bayes theorem is applied to calculate P(c|d) [4]:
P(c|d)=(P(c)P(d|c))/(P(d))
The disadvantages of Naive Bayes Classifier
The first disadvantage is that the Naive Bayes Classifier algorithm assumes the independence of the variables: This is a strong hypothesis and is violated in the majority of real cases. Indeed, if the number of lexicons increases, then the number of dependencies between the set of words increases, and therefore, the verification of the hypothesis of Naïve Bayes decreases.
Collaborative-based filtering
The two major categories of Collaborative-based filtering are:
Memory-based Approaches
Memory-based uses the entire or a sample of the user-item database to generate a prediction. Every user is part of a group of people with similar interests. Such approaches have two main steps, i.e., calculation of similarities between user and items using rating information and predicting the unknown rating and thus providing either a single value or a list of top n items that the user may like.
Memory based approaches can be classified into two main types:
User-based Collaborative Filtering
Item-based Collaborative Filtering

User-Based Collaborative Filtering (U2U)
This approach tends to assimilate a user with a set of users with the same interests and to draw inspiration from objects appreciated by them in order to establish recommendations. The principle is that users who shared the same preferences in the past are likely to share their preferences in the future.
Collaborative filtering based on items (I2I)
When the number of users exceeds the number of items significantly, scalability issues arise. For this reason, collaborative filtering based on items has been proposed. The principle is to exploit the similarity between items (and no longer between users) to generate recommendations.
Unlike U2U collaborative filtering or similarities are calculated between users, in this case the similarities are calculated between items. Unlike content-based filtering, item similarities are calculated using collaborative content, that is, the notes of these items, rather than their description.
Model-Based Approaches
To build a model some data mining or machine learning algorithms can be applied, including K-means algorithm. Model-based techniques provide recommendations by estimating parameters of statistical models for user ratings and do not use all the available information to make a prediction.
K-means clustering
K-means clustering is a type of unsupervised learning, which is used when you have unlabeled data. The purpose of this algorithm is to identify groups of observations with similar characteristics.

It makes it possible to group in K distinct clusters the observations of the data set. So similar data will be in the same cluster. Moreover, an observation can only be found in one cluster at a time (exclusivity of belonging). The same observation, therefore, cannot belong to two different clusters. To be able to group a separate K-cluster dataset, the K-Means algorithm needs a way to compare the degree of similarity between the different observations. Thus, two similar data will have a reduced dissimilarity distance, while two different objects will have a larger separation distance.
It is an iterative algorithm and starts with a random partitioning of the items into k clusters. Each iteration, the centroids of the clusters is computed and each item is reassigned to the cluster whose centroid is closest. The Algorithm Process is Described Below:

The disadvantages of K-means
The first disadvantage is that K-means algorithm is very slowly because of the need to pass observations several times.
The second disadvantage is that the solution depends on the initial choice of the class centers and may depend on the order of the individuals.
The third disadvantage is that the result depends strongly on the choice of centers initials which will not necessarily provide the result optimum but provides a local optimum that depends initial centers.
Conclusion
In this report, I presented recommendation systems based on content based filtering, collaborative filtering and hybrid recommendation methods. Besides, I have presented two machine learning methods used in recommendation systems which are Naive Bayes Classifier and K-means clustering. However, the current recommendation system must use all the information possible to make a recommendation in real time.