Recommendation System

The most essential way to grow the businesses and make more customers more satisfied with the services. It is very important to understand the needs and interest of the customers.

The recommendation system are developed in order to know about the customers and thus offer products or services to the customers accordingly. These recommendation systems uses to customers past history such as interests, purchases, or ratings. With their (customers) history new related products are recommended.

Now a days, these recommendation system are necessary for the success of business. Therefore, lot of successful businesses has developed and invested in improvement of these systems. Netflix has developed its recommendation system for movies recommendation. Alibaba and Amazon has also developed products recommendation , YouTube has video recommendations.

Since, these recommendation system are so important it better to learn how these recommendation system works. There are three important types of recommendation system, anyone should know about.

  1. Content base recommendation system
  2. Collaborative recommendation system
  3. Hybrid recommendation system

Content base Recommendation System

Content base filter, is referred as cognitive filtering since it recommends on the basis of content of an item and user’s profile. For example if a user is interested in traveling, cooking and reading. These content base filter system will recommends contents related to user’s profile.

I believe there can be many other different ways to determine recommendation. In here, linear regression can be used to get recommendation items. Let assume, we have to develop movie recommendation system. In here, there can be different features such as romantic, comedy, action and horror, therefore can be denote has x1,x2,x3 .. and so on. These features determine the types of a single movie belongs. Furthermore, the data contains the rated or not rated with respect to users.

This can be represented has follows.

MOVIE           | Alice | Bob | John | Dave | x(1) romantic | x(2) comedy
Love at Last  |  5        | 5       | 0       | 0         | 0.9                      | 0.1
Romance       | 5         | 5       | 0       | 0         | 1.0                      |0.01
Cute Puppies| ?          | 4       | 0       | ?         | 0.99                    | 0

Here Alice, Bob, John and Dave are parameters Θ and number of training set m = 3 and number of parameter (uses) is 4. As you notice, there is different features vector for every movies, To determine what will Alice rate Cute puppies, For each user (j), learn parameter Θ^j. Predict user j as rating movie (i) with (Θ^j)^transpose . (x^i). And to come up with parameter Θ we can write equation as.

min(Θ) 1/2 ∑_(i=1)^n ∑_(j=1)^m〖θ^((j)t)-y〗+ regularization

Collaborative Recommendation System

Collaborative filter, recommends are based on collecting and analyzing large amount of users’ information. These are based on users behaviors, activities, and preferences on some particular item. For example, Alice wanted to buy Pizza and Chicken Sandwich, before She buys Pizza and Chicken, the same was ordered by Bob including a Coke. Thus the system will recommend Alice to also buy Coke along with Pizza and Chicken Sandwich.

From the above table, let consider that we don’t know about how much a particular movie genre (romantic, comedy and horror).

MOVIE           | Alice | Bob | John | Dave | x(1) romantic | x(2) comedy
Love at Last  |  5        | 5       | 0       | 0         | ?                         | ?
Romance       | 5         | 5       | 0       | 0         | ?                         | ?
Cute Puppies| ?          | 4       | 0       | ?         | ?                         | ?

To determine how much a particular movie is romantic or comedy, we have to go to the users therefore Alice rating tells us that she like romantic movies.

Consider Θ1 .. Θn are the rating already provided by the users. Thus the mathematical

min(x) sum all movies(sum all users rating (Θjt – y)^2)) + regularization

Hybrid Recommendation System

New research has come up with the hybrid approach by combing content base and collaborative base recommendation system. In this type of approach the result of content base and collaborative base are unified into one model. Using hybrid recommendation system it was seen that it was generating more accurate recommendation then using the individuals separately.

In my opinion, Hybrid recommendation system can be also called as collaborative filtering algorithm where features x and parameter Θ are combined to give a much better results.

When using linear regression for recommendation system these can be mathematically denote has

min X,Θ = J(x1…xN, Θ1 ..ΘN)

Mean Normalization

What will be the best way to add rating for the new registered user who has never rated any movies yet. If we used linear regression algorithm to find the recommended movie, and since the new user has never rated a movie, the regularization term will end up rate all the movies to zero, which is indeed not a good implementation of the system.

Therefore, let consider

Y = [5 5 0 0 ?]  taking mean of first row in the matrices of rating μ = [2.5], now subtract matrices Y with μ, which will then become [2.5, 2.5, -2.5, -2.5, ?]. This is now new data set from which we can now learn Θ and X.

Last step to determine ratings for new user, for each user j on the movie i, (Θ^j)^t.x^i + μi. Here Θ and X are the mean normalization values and adding mean value back, because we previously subtract it from original data. Thus our final result will become 2.5 for the new user.

Above is the explanation of recommendation system however, The code explains the recommendation system using cosine similarity. Cosine similarity is not efficient to solve the problem, since it results in the curse of dimensionality





Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: