Wednesday, May 22, 2013

Recommendation System in M/C Learning

Recommendation system is the important feature of m/c learning.Many e-commerce portal like as Ebay, Amazon, Netflix provide recommendation to user. They provide recommendation by analysis the user behavior through past history of items purchased by user or item selling pattern.

Here is example of Predict Movie Rating by user :

Example :










In above table question mark(?) for those movie, user didn't rate it. According to above rating table, Ravi, Deepak, Vijay like Romantic Movie and Alice, Bob like action movie.


nu : Number of user, nm : Number of movies
r(i,j)=1 if user j has rated movie i.
y(i,j)=Rating given by user j to movie i (defined only if r(i,j) = 1)


Recommended system will predict the rating of all '?' in above table by analyzing te user behavior like as   Ravi, Deepak, Vijay like Romantic Movie and Alice, Bob like action movie.


Different approaches uses in building the recommended system. One of the approach is Content Base Recommend  System.

Content Base Recommended System:
Lest assume we have two features x1, x2 for above movie rating data, which provide how strong movie is romantic/action.






For each user we calculate y(i,j) which is calculated by product of Θ(j) transpose and x(i). Here Θ(j) is learning rate of user j and x(i) is feature vector of movie i.

For movie DDLJ feature vector x(1)  is [1 0.9. 0] and lets assume we had calculated learning rate Θ(1) for user 1 is :








(1))*   x(1)  = 3.6 (1*0 + 0.9*4+ 0*1)

So user Ravi will give rating 3.6 to Aashiqui-2.



Learn Θ :


To learn Θ minimize this function :









Another approach is Collaborative Filtering :


In Content base recommendation system feature set x(1) , x(2 )is already provided. But in collaborative filtering it learn by itself from the user.


Get the information form user, what kind of movie Romantic/Action he/she like. We get Θ value from each user.












Above figure explain, we will get Θ value from each user and from that we will predict feature value as how strong movie is action movie or romantic movie.

In this to get the value of x(i), we use this following function for minimizing









For each product of 
(i))*   x(i)  , We are learning feature vector  x(i)


x(1) = Romance,   x(2) = Action,   x(3)= Horror


How can we find movie i related to movie j ?


Find the minimum value of || x(i)  -  x(j)||


Which movie i have minimum value of || x(i)  -  x(j)||, that movie i is most similar to movie j.


This we can find 5/10/20 most similar movie recommendation of movie j.
In the above equation we are predicting X value from given Θ value and in previous content base recommendation we predict Θ value  from given feature  value x.

So from x predict  Θ and from  Θ predict x.

X ----predict--->Θ---predict---->X----predict---->Θ---predict---->X----predict--->Θ---predict---->X


This is collaborative filtering where each user collaborating with other user to predict movie rating in better way.  


Mean Normalization : Mean normalization method use for predict the rating for those user who haven't rated any movie till now.


For each user j, predict the rating for movie i as :
 (i))*   x(i)  +  µ

For new user 6,  Θ(i)   is  :


then (Θ(i))*   x(i) = 0 and  (i))*   x(i)  +  µ =  µ
So Rating for new use would be average of total rating given to movie i like as shown is figure :


 

No comments:

Post a Comment