A Contextual Item-Based Collaborative Filtering Technology *

This paper proposes a contextual item-based collaborative filtering technology, which is based on the traditional item-based collaborative filtering technology. In the process of the recommendation, user’s important mobile contextual information are taken into account, and the technology combines with those ratings on the items in the users’ historical contextual information who are familiar with user’s current context information in order to predict that which items will be preferred by user in his or her current context. At the end, an experiment is used to prove that the technology proposed in this paper can predict user’s preference in his or her mobile environment more accurately.


Introduction
Traditional personalized recommendation systems are used to suggest products or information or service to the customers in some E-commerce sites.However, the technology is bounded to the desktop.Now, with the continuous improvement of the wireless communication technology and the emergence of so many advanced mobile terminals, such as smart phone and tablet PC, the recommendation's environment is changing and the recommendation technology should make a change.For instance, in an online tourism site the user's previous visiting experience to a scenery spot in a sunshine day may be quite different from the visit in a rainy day.Consequently, user's contextual information should be taken into account, and it has demonstrated that the contextual information did play an important role in the recommendation technology by Adomavicius et al. [1].
Collaborative Filtering (CF) is proved effective in the E-commerce systems, but those traditional collaborative filtering technology did not consider the user's contextual information [2][3][4].Some applications in ubiquitous computing environment has used collaborative filtering in their recommendation, but they also did not utilize the user's contextual information [5,6].However, some context-aware recommendation systems using collaborative filtering have taken some user's contextual information into consideration.Annie Chen [7] proposed a contextaware collaborative filtering system, which mainly is base on the user-based CF, not the item-based CF.Min Gao et al. [8] proposed a personalized context-aware collaborative filtering based on neural network and Slope One algorithm.Slope One is a famous item-based CF algorithm, while it calculates the dissimilarity between items rather than the similarity which is calculated in traditional itembased CF.
In this paper, we propose a contextual item-based collaborative filtering, which is based on the traditional item-based CF calculating the similarity.Our approach calculates the similarity between the active user's current context and the other contexts, finds out the ratings already given by the active user about the items under the contexts which are similar with user's current context, and then predicts that which items the active user will prefer in the current context.
The remainder of this paper is organized as follows.In Section II, we will give an overview of the process of the traditional item-based collaborative filtering.Then, we will introduce the concept of the context and put an emphasis on the process of the contextual item-based collaborative filtering in Section 3. Subsequently, we experimentally evaluate our approach in Section 4. And at last we draw a conclusion in Section 5.
similarly towards other things [7].CF can be divided into two parts: user-based CF and item-based CF.In this paper, we mainly discuss the process of the item-based CF.Item-based CF computes the similarity between items and then selects the most similar items for prediction [8].

Building a User Profile
First, we should build a user profile.The basic data source of the technology is a user-items matrix, A(m,n).It stores the ratings which are given by m users for n items.m denotes the users information , and n denotes the items information . If a user u rates an item i, it will generate a rating, , u i , which is between 0 and 5.The bigger the rating, the more the user likes the item.

Selecting the Nearest Neighbors
The key of the CF is selecting the nearest neighbors and utilizing the neighbors' preference to predict the active user's preference.In the item-based CF, we should calculate the similarity between the items at first.Three similarity measures were introduced in [4]: Pearson correlation, Spearman rank correlation, and cosine vector similarity.We use the Pearson correlation to calculate the similarity between the items.The equation calculating the similarity between the item i and the item j is: , In the equation, i R denotes the mean of the ratings which are given by all users for item i.
When we get all the similarities, we sort by size and select the top K. Then they consist of the Nearest Neighbors Collection of the item i, i KNNC .

Generating the Prediction
Now, we can utilize the neighbors' ratings to predict the active user's preference by computing a weighted average of the ratings which is formulated as The three steps cover the basic process of the itembased CF.Then, we will introduce how to generate a prediction for a user when he is in a mobile environment.

A Contextual Item-Based Collaborative Filtering Technology
The technology we will introduce is an item-based CF incorporating user's contextual information.So we should introduce what context is at first.

What Is Context
Context is a multifaceted concept.Many researchers have given different definitions.In 2001, Dey [9] proposed his definition of context: "Context is any information that can be used to characterize the situation of an entity.An entity is a person, place, or object that is considered relevant to the interaction between a user and an application, including the user and applications themselves".
i presents one type of contexts, such as Time.And i consists of many different variables.For instance, in the type of Time, there are several values (such as morning, noon, afternoon, and evening) or lots of specific values of time (such as 5:00 pm, 11:00 am, and so on).And a user may have different preference for the same item in different variables of one type of context.So we can give the definition of : , , , Then, we will introduce the specific process of the contextual item-based CF.Because the technology we proposed is based on traditional item-based CF, the process we will introduce in the following is similar with the content mentioned in the Section 2.

Building a User Profile
This step is also building a user profile, but we must incorporate some user's contextual information.In the traditional item-based CF, what we build is a two-dimension model which includes users' and items' information.Adomavicius et al. [11] proposed a multi-dimension model recommendation space.It is very suitable for us to build a User × Item × Context model.Figure 1 shows our specific three-dimension rating model.
In the Figure 1, there is , , u i c , which means the user u 1 gives a rating whose value is 3 for the item i 1 in the variable c 11 of context C 1 .So there are many models which store the ratings given by all users for every item in each context variable.

Calculating the Similarity between Contexts
Calculating the similarity between contexts is aimed at finding out which ratings given in the other contexts are Copyright © 2012 SciRes.IIM more relevant for the current context.However, there are many variables in each context type.Therefore we should find out which variables of the other context are the same with the variables of current context at first.Then, we could calculate the similarity between the two variables using the equation as follows: , , This equation is similar with Equation ( 1), but in Equation (5), t denotes one type of context, , , u i x means that user u gave a rating for item i on the variable x in the context t, and R i R represents the mean of the ratings for the item i.
We can utilize the Equation ( 5) to calculate the similarity between the active user's current context and the other contexts in which some variables are the same with ones of current context.We take the   , , t sim C s i as the similarity where C means the current context, and s denotes the variables of the current context who are the same with the ones in the other contexts.

Selecting the Nearest Neighbors
Before we select the nearest neighbors of the active item, we should calculate the similarity between the items.However, the method calculating the similarity is based on the ratings for these items.So we must know the ratings which are rated by the active user for the items in the current context at first.By using the Equation (5), we define the ratings as follows: , , Then, we can utilize the ratings and combine with the Equation (1) to calculate the similarity between the item i and the item j.After that, we do the same work introduced in the part B of the Section 2, and consequently we find out the Nearest Neighbors Collection of the item i.

Generating the Prediction
After we get the nearest neighbors, we can utilize the Equation ( 2) to predict the active user's ratings for the item i in the context C. We define the ratings as .
, , a i C P

Experiment and Results
We evaluate our approach through an experiment in which we compare our approach with the traditional item-based CF.The specific process is as follows:

Datasets
The datasets offered for the experiment are from Movie-Lens which is a famous recommender system.We use the 100 k rating data set which consists of 100,000 ratings from 943 users on 1682 movies.In the datasets, each user has rated at least 20 movies and the rating is from 0 to 5.
We use the u1.base of the data set as our base data, and use the u1.test as the test data to prove if our approach is more effective in recommendation.Because we must incorporate some contextual information into the process, we can consider users' age, gender and occupation as the contextual information since these three types belongs to the category of individuality which is already introduced in the part A of Section 3.

Metrics
We use the Mean Absolute Error (MAE) as the metrics to measure the prediction quality of our approach.
The MAE is defined as [12]: where i denotes the value of the prediction of i by our approach, i denotes the value of the real ratings of i, and N denotes the number of the tested ratings.p q

Comparative Results in Terms of MAE
In the process of the experiment, we calculate the respective MAE of our proposed approach (Proposed) and the traditional item-base CF (TCF).The number of nearest neighbors is increased from 30 to 100 by 10.Hence, there are eight values of MAE.We compare these values in order to judge which prediction is more close to the real ratings.The results are shown in the Figure 2 as follows: This study proposed a contextual item-based collaborative filtering technology which incorporated users' important contextual information into the traditional itembased collaborative filtering in order to cope with that users have different preference for the items in different context.The results of the experiment showed that our approach surpasses the traditional item-based CF in providing accurate items for the users in the proper time.
That is to say in the mobile environment, when we take user's contextual information into consideration, the results of the recommendation will be more accurate.
Zimmermann et al. [10] utilized Dey's definition and then divided the context into five categories: individuality, activity, location, time, and relations.The categories are very suitable to build context model for the recommendation.So we propose our presentation for context: