# Normalizing Item-Based Collaborative Filter Using Context-Aware Scaled Baseline Predictor

Authors: Wenming Ma; Junfeng Shi; Ruidong Zhao
Journal: Mathematical Problems in Engineering
 (2017)

---

## Abstract

Item-based collaborative filter algorithms play an important role in modern commercial recommendation systems (RSs). To improve the recommendation performance, normalization is always used as a basic component for the predictor models. Among a lot of normalizing methods, subtracting the baseline predictor (BLP) is the most popular one. However, the BLP uses a statistical constant without considering the context. We found that slightly scaling the different components of the BLP separately could dramatically improve the performance. This paper proposed some normalization methods based on the scaled baseline predictors according to different context information. The experimental results show that using context-aware scaled baseline predictor for normalization indeed gets better recommendation performance, including RMSE, MAE, precision, recall, and nDCG.


---

## Body

## 1. Introduction

The abundance of information available on the Internet makes the increasing difficulty in finding what the people want, especially for the Electronic Commerce domain. As a consequence, building personalized information selection models is becoming crucial. Among many different information selection technologies, the recommendation systems are greatly developed due to their application on most of the famous online shopping companies [1, 2].The algorithms of recommending items have been studied extensively, most of which belong to two main categories. Content-based recommendation systems try to recommend items according to the users’ past preference [3–5], whereas the collaborative recommendation systems make the recommendation in terms of the similar neighborhood preference [6–9]. Recommendation systems based purely on content generally easily suffer from the problems of limited content analysis and overspecialization. Defining the appropriate items’ features is very difficult for many situations, and these features depend heavily on the users’ history, which cannot find the latent profiles for recommendation.Collaborative filter (CF) approaches overcome some of the limitations of content-based ones. Items for which the content is not available or difficult to obtain can still be recommended to users through the feedback of other users. CF ones can also recommend items with very different content, as long as other users have already shown interest for these different items. Among collaborative recommendation approaches, methods based on nearest neighbors still enjoy a huge amount of popularity, due to their simplicity, their efficiency, and their ability to produce accurate and personalized recommendations [10–12]. CF models try to capture the interactions between users and items that produce the different rating values. However, many of the observed rating values are due to effects associated with either users or items, independently of their interaction. A principal example is that typical CF data exhibit large user and item biases, that is, systematic tendencies for some users to give higher ratings than others and for some items to receive higher ratings than others.Item-based collaborative filter [13, 14] has much more accuracy than user-based one [15, 16], when the number of items is larger than the number of users. The electronic commercial business always has huge productions. The number of productions far exceeds the number of users. However, the average number of common ratings is very small, because most of the users only have interest in very few items. User-based collaborative filter systems easily suffer from overfitting problems in this situation. So the item-based collaborative filter algorithms play an important role in modern commercial recommendation systems (RSs). This paper intends to improve the recommendation performance using a novel rating normalization strategy.When it comes to assigning a rating to an item, each user has its own personal scale. Even if an explicit definition of each of the possible rating is supplied, some users might be reluctant to give high/low scores to items they liked/disliked. There are some different rating normalization schemes which are designed for different reasons [17–19]. Also, many of the observed rating values are due to effects associated with either users or items, independently of their interaction. We do not only convert individual ratings to a more universal scale but also consider the user and item biases.The baseline predictor (BLP), which combines the overall averaging rating and user or item biases, involves these factors for normalization. But, for the item-based collaborative filter systems, the BLP is always a statistical constant which cannot be adaptively changed according to the context [20–23]. We found that the recommendation performance can be improved if we slightly scale the different parts of the BLP in a limited range. In this paper, we provided some novel context-aware scaled baseline predictors (CASBLP) for item-based collaborative filter normalization, considering different context information. The experimental results show that CASBLP can significantly improve the prediction performance, such as Root Mean Squared Error (RMSE), Mean Absolute Error (MAE), precision, recall, and Normalized Cumulative Discounted Gain (nDCG).The rest of this paper is organized as follows. We present the details of CASBLP in Section2 and show experimental results in Section 3. Finally, we conclude the paper in Section 4.


## 2. Description of Models

### 2.1. Baseline Predictor for Item-Based CF Normalization

A general neighborhood-based collaborative filter recommendation using BLP normalization is defined as follows:(1)r^ui=bui+Υku,i.Υ
k
(
u
,
i
) is rating predictor based on the k nearest neighbors. bui is the baseline predictor, which is always defined as(2)bui=μ+bi+bu.Denote byμ the average ratings. The parameters bi and bu indicate the observed deviations of item i and user u, respectively, from the average.For item-based CF, we do not use the user biases due to using the similar items as neighbors. So the BLP in item-based CFS is(3)bui=μ+bi.Υ
k
(
u
,
i
) is replaced by the following formula:(4)Υku,iib=∑j∈Si,k∩Nuwijruj-buj∑j∈Si,k∩Nuwij.S
(
i
,
k
) is the set of the most similar k items to the item u, and N(u) is the set of items the user u has rated.There are many different similar weight functions. In this paper, we use two popular ones, Cosine and Pearson’s Correlation, the details of which are defined, respectively, as(5)Coswi,j=∑u∈Urui·ruj∑u∈Urui2·∑u∈Uruj2,PCwi,j=∑u∈Urui-bui·ruj-buj∑u∈Urui-bui2·∑u∈Uruj-buj2.


### 2.2. Motivation of Scaling Baseline Predictor

The baseline predictor can introduce some information which is independent of neighborhood influence, but it is always set as a constant. However, we found that slightly scaling the baseline predictor could get a better predicting accuracy. But using a single scaling factor forμ, bi, and bu is not a good idea. Figure 1 shows an example where we can decrease the RMSE when scaling bui (e.g., αbui) on a small MovieLens dataset.Figure 1
Impact of unified scaling factor on RMSE.From Figure1, the best scaling factor is 0.6, at which we can get the lowest RMSE. However, from another perspective, such as TopN measure, using the same scaling factor 0.6 is not a good choice. Figure 2 shows that scaling BP could not improve the precision and recall.Figure 2
Impact of unified scaling factor on precision and recall.For the recommendation systems, TopN measure is more important than RMSE. To improve both RMSE and TopN measure, we should not use the same scaling factor for the parameters in bui:(6)b^ui=αμ+γbi.Determining these three parameters is very difficult, but, unlike matrix factorization models, NBCFs can also not train the unknown parameters. In this paper, we provide several context-aware scaling factors. Before describing the details, we first change (6) to another representation. Actually, the baseline predictor can be also described as(7)bui=μ+∑urui-μUi.U
i is the set of users rating item i. The scaling version of baseline predictor can be considered as (8)b^ui=αμ+∑urui-μUi+β+∑irui-μIu+β.Here, we use the denominatorβ to control the scaling factors, and hence γ=|Ui|/|Ui|+β. In fact, β is the Bayesian mean damping term [24]. It biases means toward the global mean αμ. Our task is to determine α and β according to the context information.The recommendation system is a very special machine learning research. The user-item matrix is always too sparse. When data is sparse, we need other sources of knowledge to help the machine learning algorithm. Mining the context information is a way of adding knowledge to the recommendation system algorithms.


### 2.3. Context-Aware Scaled Baseline Predictors

We consider several context situations to determine the scaling baseline predictors: ratings distribution, categories distribution, timestamp distribution, and links distribution. At first, we denote byI the set of all the items and by U the set of all the users.The rating distribution aware (RDA) method scales the baseline predictors in terms of ratings distribution. The values of ratings are usually discrete. Denote byV={v1,v2,…,vm} the set of possible rating values, where v1<v2<⋯<vm.Denote byN(vi) the set of rating records of which the value is vi: (9)Nvi=u,i,r,Nvi·r=vi.u is the user, i represents the item, and r means the rating of i rated by u. Also, U(vi) denotes the set of users whose ratings contain vi, and I(vi) denotes the set of items which are rated using the value vi. Now we sort all N(vi)s, and let Vdsc be the set of N(vi)s order by descent according to the size of sets: Vdsc={N(vj)1,N(vh)2,…,N(vq)m}, where |N(vj)1|≥|N(vh)2|≥⋯≥|N(vq)m|,v(i)∈V. Denote by E all the rating records. The scaling factors of RDA are evaluated as(10)α=∑NvidE,d≤k,β=∑Nvid⋃UNvid·r,d≤k. Here, we use the k largest N(vi)s. If the sizes of some sets are equal and the number of candidates is larger than k, we randomly select the sets of the same size.Like RDA, the category distribution aware (CDA) method scales the baseline predictors in terms of category distribution. The items in recommendation system always have some labels, indicating some special attributes. In the MovieLens, the movies have some labels of genres. Each label corresponds to a category, and each item may belong to at least one category.Suppose we haves categories, and denote by C the set of these s different categories, where C={c1,c2,…,cs}. Denote by I(ci) the set of items belonging to ci. Idsc is a descent ordered set according to the size of set: Idsc={I(cj)1,I(ch)2,…,I(cq)s}, where |I(cj)1|≥|I(ch)2|≥⋯≥|I(cq)s|,ci∈C. For CDA, the scaling factors are expressed as(11)α=⋃IcidI,d≤k,β=∑Icid⋃Icid·C,d≤k.Note that to determine β we use ∑Icid as the numerator and ⋃Icid as the denominator. The difference is that the items always belong to multiple categories.There is always a timestamp record for each rating. The timestamp distribution aware (TDA) method scales baseline predictor in terms of timestamp distribution. Suppose that the element ofE is a 4-tuple, where el=u,i,r,t∈E. The meanings of u, i, and r are the same as in N(vi). t is just the timestamp when u rated i by the score r. The format of t is usually a Unix timestamp. We change t to “yy-mm-dd” format t^. That means the base unit of time is the day, and now el=u,i,r,t^.LetT(t^i) be the set of rating records, of which the reduced timestamp is t^. Like the previous two methods, we create a descent ordered set Tdsc={T(t^j)1,T(t^h)2,…,T(t^q)z} according to the size of T(t^i), where |T(t^j)1|≥|T(t^h)2|≥⋯≥T(t^q)z.We select the firstg elements of Tdsc to compose another truncated set Tdscg={T(t^j)1,T(t^h)2,…,T(t^y)g},g≤z,Tdscg⊆Tdsc. Denote by U((t^i)d) the set of distinct users of the rating records belonging to T((t^i)d). The scaling factors of TDA are expressed as (12)α=1/g∑d≤gTt^id1/k∑d≤kTt^id,k≤g,β=∑d≤kUt^id,k≤g.The links distribution aware (LDA) method scales baseline predictor in terms of links distribution. The links mean the relationship between users and items, which make up a rating network. Any pairs of users have no link, and any pairs of items also have no link. Equation (13) and Figure 3 show an example of rating network: (13)uii1i2i3i4uuuu1u2u3u40011101010000101.Figure 3
Example of rating network.Only when the rating betweenu and i is larger than or equal to rT can we connect u and i. The degree of the user u is expressed as ϕU(u) and ϕI(i) for the item i. We create two descent ordered sets Udsc and Idsc according to the degrees. It is obvious that Udsc=U and Idsc=I. But, for convenience, we use different symbols. That is, Udsc={u^1,u^2,…,u^m} and Idsc={i^1,i^2,…,i^n}. There is a unique mapping from ui∈U to u^i∈Udsc and from ii∈I to i^j∈Idsc. For Udsc and Idsc, we have ϕU(u^1)≥ϕU(u^2)≥⋯≥ϕU(u^m) and ϕI(i^1)≥ϕI(u^i)≥⋯≥ϕI(i^n). We put the ordered degrees of users and items into two sets, respectively: DU={Du(1),Du(2),…,Du(m)} and DI={Di(1),Di(2),…,Di(n)}, where Du(1)≥Du(2)≥⋯≥Du(m) and Di(1)≥Di(2)≥⋯≥Di(n).For LDA, we have two ways of evaluating the scaling factors. When considering the degrees of the users, the method is called LDAU, which is expressed as(14)α=1/g∑d≤gDud1/k∑d≤kDud,k≤g≤m,β=1/g∑d≤gDud1/m∑d≤mDud,g≤m.Also, when considering the degrees of the items, the method is called LDAI, and the scaling factors are expressed as(15)α=1/g∑d≤gDId1/k∑d≤kDId,k≤g≤n,β=1/g∑d≤gDId1/n∑d≤nDId,g≤n.Unlike the other methods, LDA controlsα and β using different distributions. For α, we use the top k and top g degrees, but for β, we use the top g degrees and the average degree.


## 2.1. Baseline Predictor for Item-Based CF Normalization

A general neighborhood-based collaborative filter recommendation using BLP normalization is defined as follows:(1)r^ui=bui+Υku,i.Υ
k
(
u
,
i
) is rating predictor based on the k nearest neighbors. bui is the baseline predictor, which is always defined as(2)bui=μ+bi+bu.Denote byμ the average ratings. The parameters bi and bu indicate the observed deviations of item i and user u, respectively, from the average.For item-based CF, we do not use the user biases due to using the similar items as neighbors. So the BLP in item-based CFS is(3)bui=μ+bi.Υ
k
(
u
,
i
) is replaced by the following formula:(4)Υku,iib=∑j∈Si,k∩Nuwijruj-buj∑j∈Si,k∩Nuwij.S
(
i
,
k
) is the set of the most similar k items to the item u, and N(u) is the set of items the user u has rated.There are many different similar weight functions. In this paper, we use two popular ones, Cosine and Pearson’s Correlation, the details of which are defined, respectively, as(5)Coswi,j=∑u∈Urui·ruj∑u∈Urui2·∑u∈Uruj2,PCwi,j=∑u∈Urui-bui·ruj-buj∑u∈Urui-bui2·∑u∈Uruj-buj2.


## 2.2. Motivation of Scaling Baseline Predictor

The baseline predictor can introduce some information which is independent of neighborhood influence, but it is always set as a constant. However, we found that slightly scaling the baseline predictor could get a better predicting accuracy. But using a single scaling factor forμ, bi, and bu is not a good idea. Figure 1 shows an example where we can decrease the RMSE when scaling bui (e.g., αbui) on a small MovieLens dataset.Figure 1
Impact of unified scaling factor on RMSE.From Figure1, the best scaling factor is 0.6, at which we can get the lowest RMSE. However, from another perspective, such as TopN measure, using the same scaling factor 0.6 is not a good choice. Figure 2 shows that scaling BP could not improve the precision and recall.Figure 2
Impact of unified scaling factor on precision and recall.For the recommendation systems, TopN measure is more important than RMSE. To improve both RMSE and TopN measure, we should not use the same scaling factor for the parameters in bui:(6)b^ui=αμ+γbi.Determining these three parameters is very difficult, but, unlike matrix factorization models, NBCFs can also not train the unknown parameters. In this paper, we provide several context-aware scaling factors. Before describing the details, we first change (6) to another representation. Actually, the baseline predictor can be also described as(7)bui=μ+∑urui-μUi.U
i is the set of users rating item i. The scaling version of baseline predictor can be considered as (8)b^ui=αμ+∑urui-μUi+β+∑irui-μIu+β.Here, we use the denominatorβ to control the scaling factors, and hence γ=|Ui|/|Ui|+β. In fact, β is the Bayesian mean damping term [24]. It biases means toward the global mean αμ. Our task is to determine α and β according to the context information.The recommendation system is a very special machine learning research. The user-item matrix is always too sparse. When data is sparse, we need other sources of knowledge to help the machine learning algorithm. Mining the context information is a way of adding knowledge to the recommendation system algorithms.


## 2.3. Context-Aware Scaled Baseline Predictors

We consider several context situations to determine the scaling baseline predictors: ratings distribution, categories distribution, timestamp distribution, and links distribution. At first, we denote byI the set of all the items and by U the set of all the users.The rating distribution aware (RDA) method scales the baseline predictors in terms of ratings distribution. The values of ratings are usually discrete. Denote byV={v1,v2,…,vm} the set of possible rating values, where v1<v2<⋯<vm.Denote byN(vi) the set of rating records of which the value is vi: (9)Nvi=u,i,r,Nvi·r=vi.u is the user, i represents the item, and r means the rating of i rated by u. Also, U(vi) denotes the set of users whose ratings contain vi, and I(vi) denotes the set of items which are rated using the value vi. Now we sort all N(vi)s, and let Vdsc be the set of N(vi)s order by descent according to the size of sets: Vdsc={N(vj)1,N(vh)2,…,N(vq)m}, where |N(vj)1|≥|N(vh)2|≥⋯≥|N(vq)m|,v(i)∈V. Denote by E all the rating records. The scaling factors of RDA are evaluated as(10)α=∑NvidE,d≤k,β=∑Nvid⋃UNvid·r,d≤k. Here, we use the k largest N(vi)s. If the sizes of some sets are equal and the number of candidates is larger than k, we randomly select the sets of the same size.Like RDA, the category distribution aware (CDA) method scales the baseline predictors in terms of category distribution. The items in recommendation system always have some labels, indicating some special attributes. In the MovieLens, the movies have some labels of genres. Each label corresponds to a category, and each item may belong to at least one category.Suppose we haves categories, and denote by C the set of these s different categories, where C={c1,c2,…,cs}. Denote by I(ci) the set of items belonging to ci. Idsc is a descent ordered set according to the size of set: Idsc={I(cj)1,I(ch)2,…,I(cq)s}, where |I(cj)1|≥|I(ch)2|≥⋯≥|I(cq)s|,ci∈C. For CDA, the scaling factors are expressed as(11)α=⋃IcidI,d≤k,β=∑Icid⋃Icid·C,d≤k.Note that to determine β we use ∑Icid as the numerator and ⋃Icid as the denominator. The difference is that the items always belong to multiple categories.There is always a timestamp record for each rating. The timestamp distribution aware (TDA) method scales baseline predictor in terms of timestamp distribution. Suppose that the element ofE is a 4-tuple, where el=u,i,r,t∈E. The meanings of u, i, and r are the same as in N(vi). t is just the timestamp when u rated i by the score r. The format of t is usually a Unix timestamp. We change t to “yy-mm-dd” format t^. That means the base unit of time is the day, and now el=u,i,r,t^.LetT(t^i) be the set of rating records, of which the reduced timestamp is t^. Like the previous two methods, we create a descent ordered set Tdsc={T(t^j)1,T(t^h)2,…,T(t^q)z} according to the size of T(t^i), where |T(t^j)1|≥|T(t^h)2|≥⋯≥T(t^q)z.We select the firstg elements of Tdsc to compose another truncated set Tdscg={T(t^j)1,T(t^h)2,…,T(t^y)g},g≤z,Tdscg⊆Tdsc. Denote by U((t^i)d) the set of distinct users of the rating records belonging to T((t^i)d). The scaling factors of TDA are expressed as (12)α=1/g∑d≤gTt^id1/k∑d≤kTt^id,k≤g,β=∑d≤kUt^id,k≤g.The links distribution aware (LDA) method scales baseline predictor in terms of links distribution. The links mean the relationship between users and items, which make up a rating network. Any pairs of users have no link, and any pairs of items also have no link. Equation (13) and Figure 3 show an example of rating network: (13)uii1i2i3i4uuuu1u2u3u40011101010000101.Figure 3
Example of rating network.Only when the rating betweenu and i is larger than or equal to rT can we connect u and i. The degree of the user u is expressed as ϕU(u) and ϕI(i) for the item i. We create two descent ordered sets Udsc and Idsc according to the degrees. It is obvious that Udsc=U and Idsc=I. But, for convenience, we use different symbols. That is, Udsc={u^1,u^2,…,u^m} and Idsc={i^1,i^2,…,i^n}. There is a unique mapping from ui∈U to u^i∈Udsc and from ii∈I to i^j∈Idsc. For Udsc and Idsc, we have ϕU(u^1)≥ϕU(u^2)≥⋯≥ϕU(u^m) and ϕI(i^1)≥ϕI(u^i)≥⋯≥ϕI(i^n). We put the ordered degrees of users and items into two sets, respectively: DU={Du(1),Du(2),…,Du(m)} and DI={Di(1),Di(2),…,Di(n)}, where Du(1)≥Du(2)≥⋯≥Du(m) and Di(1)≥Di(2)≥⋯≥Di(n).For LDA, we have two ways of evaluating the scaling factors. When considering the degrees of the users, the method is called LDAU, which is expressed as(14)α=1/g∑d≤gDud1/k∑d≤kDud,k≤g≤m,β=1/g∑d≤gDud1/m∑d≤mDud,g≤m.Also, when considering the degrees of the items, the method is called LDAI, and the scaling factors are expressed as(15)α=1/g∑d≤gDId1/k∑d≤kDId,k≤g≤n,β=1/g∑d≤gDId1/n∑d≤nDId,g≤n.Unlike the other methods, LDA controlsα and β using different distributions. For α, we use the top k and top g degrees, but for β, we use the top g degrees and the average degree.


## 3. Experiments

### 3.1. Experimental Settings

We use a MovieLens latest dataset in our experiments, including 100,000 ratings and 6,100 tag applications applied to 10,000 movies by 700 users [25]. There are four files for each dataset: links, movies, ratings, and tags. We use these files to get different context information. We compare several different methods in our experiments, the names and meanings of which are shown in Table 1.Table 1
The meanings of different methods’ names.
Name
Baseline predictor
Similarity
NoBP-Cos/PC
No
Cosine/Pearson’s Correlation
USBP-Cos/PC
Unscaled BP
Cosine/Pearson’s Correlation
RDA-Cos/PC
RDA
Cosine/Pearson’s Correlation
CDA-Cos/PC
CDA
Cosine/Pearson’s Correlation
TDA-Cos/PC
TDA
Cosine/Pearson’s Correlation
LDAU-Cos/PC
LDAU
Cosine/Pearson’s Correlation
LDAI-Cos/PC
LDAI
Cosine/Pearson’s CorrelationThe total methods compared are defined in Table1. There are two similarity weight functions in our experiments: Cosine and Pearson’s Correlation. The neighborhood sizes of item-based models are all set to 20, while they are 100 for user-based models. Values of k in (11)~(15) are the same, 6 in default. The values of g are also the same for these different methods, 20 in default. We randomly split the dataset into 5 parts and use cross-validation to train and test the models.For topN metric (e.g., precision and recall), we randomly select 100 items on the testing as the candidates, excluding the ones appearing in the training. Only the items rated above 3.5 (including 3.5) are recommended.The neighborhood collaborative filter models always incur a high memory cost. So we use a 16 GB RAM to run different NHCF algorithms.


### 3.2. Experimental Metrics

Five metrics are used in our experiments: precision, recall, RMSE (Root Mean Squared Error), MAE (Mean Absolute Error), and nDCG (Normalized Cumulative Discounted Gain).For a test datasetτ, denote by TP the set of recommend items which the users are really interested in, denote by FP the set of recommend items which the users are not interested in, denote by FN the set of not recommend items which the users are interested in, and denote by TN the set of not recommend items which the users are not interested in. The metrics of precision and recall are defined, respectively, as follows:(16)precision=TPTP+FP,recall=TPTP+FN.The recommendation system generates predicted ratingsr^ui for a test set τ of user-item pairs (u,i) for which the true ratings rui are known. The RMSE and MAE between the actual ratings are given by(17)RMSE=1τ∑u,i∈τr^ui-rui2,MAE=1τ∑u,i∈τr^ui-rui.The recommendation systems always present to the user a list of recommendations, imposing a certain natural browsing order. In many cases, we are not interested in predicting an explicit rating or selecting a set of recommended items, as in the previous sections; rather we are interested in ordering items according to the user’s preferences. nDCG is a measure from information retrieval, where positrons are discounted algorithmically. Assuming that each useru has a “gain” gui from being recommended an item i, the average Discounted Cumulative Gain (DCG) for a list of J items is defined as (18)DCG=1N∑u=1N∑j=1Jguijmax⁡1,logbj,where the logarithm base is a free parameter, typically between 2 and 10. A logarithm with base 2 is commonly used to ensure that all positions are discounted. nDCG is just the normalized version of DCG:(19)nDCG=DCGDCG∗,where DCG∗ is the ideal DCG, the value of which ranges from 0 to 1. The larger the value is, the better the performance is.


### 3.3. Experimental Results

We change a little the format of the MovieLens dataset and import this dataset to a MySQL database. The coefficients of BLP can be conveniently calculated using some advanced SQL sentences. All of the coefficients of CASBLP methods are shown in Table2.Table 2
Values of scaling factors.
Method
α
β
RDA
0.8125
32.3833
CDA
0.8964
29.6461
TDA
0.7598
37
LDAU
0.6544
12.5643
LDAI
0.8083
29.8041The experimental comparison results are shown in Table3 (using Cosine similarity) and Table 4 (using Pearson’s Correlation). It seems that using Cosine is better than using Pearson’s Correlation in our experiments. Maybe this is because even if each user has different personal rating scale, the rating matrix is too sparse to become the major issue. When data is sparse, Cosine is always a good choice.Table 3
Experimental results using Cosine.
Method
Precision
Recall
RMSE
MAE
nDCG
NoBP-Cos
12.99%
20.62%
0.9465
0.9410
0.7237
USBP-Cos
19.82%
30.78%
0.9085
0.6939
0.9389
RDA-Cos
25.34%
39.01%
0.8984
0.6889
0.9485
CDA-Cos
25.05%
39.57%
0.8973
0.6869
0.9490
TDA-Cos
25.60%
40.03%
0.8999
0.6901
0.9488
LDAU-Cos
26.15%
40.80%
0.9003
0.6904
0.9495
LDAI-Cos
25.30%
39.45%
0.8979
0.6886
0.9485Table 4
Experimental results using Pearson’s Correlation.
Method
Precision
Recall
RMSE
MAE
nDCG
NoBP-PC
12.93%
20.34%
1.2229
0.9271
0.9109
USBP-PC
20.01%
30.35%
0.9355
0.7169
0.9348
RDA-PC
25.24%
38.38%
0.9603
0.7440
0.9306
CDA-PC
24.65%
36.90%
0.9483
0.7340
0.9311
TDA-PC
25.19%
38.40%
0.9709
0.7522
0.9300
LDAU-PC
26.65%
40.93%
0.9856
0.7590
0.9327
LDAI-PC
25.19%
38.34%
0.9596
0.7434
0.9307From Table3, we can see that when not using normalization scheme (NoBP) all of the metrics are much worse than the others. The unscaled BLP is even better than NoBP, in which the precision increases by about 7%, recall increases by more than 10%, and RMSE decreases by 4%. It is surprising that only using the simple unscaled BLP the MAE increases by 15% and the nDCG increases by more than 20%. Because recommendation order has a great commercial significance, the normalization is an important improvement in recommendation system. Our context-aware scaled BLP normalization schemes make further improvement, mainly on the precision and recall metrics. From both Tables 3 and 4, CASBLP normalization has almost the same RMSE, MAE, and nDCG as the USBP, sometimes even little worse than USBP. But, for a commercial recommendation system, what the users care about is whether the RSs recommend what they really need. The production selling would benefit from even a 1% improvement on precision or recall. The precision of our CASBLP schemes increases by about 5%, and the recall increases by about 8%, which is a great improvement from the commercial perspective.An important problem is that the coefficients we used have optimal values. So we changeα from 0 to 1 and β from 0 to 200 to see the changes of the performance. Figures 4–6 show the impact of scaled factors on RMSE, precision, and recall, respectively.Figure 4
Impact of scaled factors on RMSE.Figure 5
Impact of scaled factors on precision.Figure 6
Impact of scaled factors on recall.For all these three metrics, the optimum ofβ is near 20, at which the RMSE is the lowest and the precision and recall are the highest. What is interesting is that any shrinking of α can improve precision and recall, even if we set α to zero. However, shrinking α would cause a slightly higher RMSE except at the value near 0.8.This means thatα can control the accuracy of the rating prediction, but when α has shrunk, β plays a crucial role in items recommendation. What causes this phenomenon is that maybe the mean rating is computed in terms of all the users, which involves the global information, while the biases are computed in terms of only very few similar neighbors, which involves the local information. For the personalized recommendation systems, the local information is much more important, and an ordinary average prediction has little meaning. That is why even if we set α to 0 and only using the item biases we can also get a passable prediction performance.The neighbor size is an important factor in the neighborhood-based recommendation systems, for item-based or user-based ones. We increase the neighbor size geometrically from 5 to 320. Figures7, 8, and 9 show the change of recommendation performance including precision, recall, and RMSE, respectively.Figure 7
Impact of neighborhood size on precision.Figure 8
Impact of neighborhood size on recall.Figure 9
Impact of neighborhood size on RMSE.What we can see from Figure9 is consistent with what we have concluded from Tables 3 and 4. Whether using scaled BLP or unscaled BLP, we can get similar RMSE, which are all much lower than the NoBP scheme. With the growth of the neighbor size, all the RMSE are trending toward stability.What surprised us is the results of precision and recall. Both metrics are increasing until reaching the stable values with the growth of neighbor size except the NoBP scheme, the precision and recall of which decrease to the stable values. This is due to the fact that, maybe without normalization, the prediction lacks personalization and causes too many more decoys to choose from.Figures7 and 8 also show the results which are consistent with Tables 3 and 4. Just slightly changing the coefficients of BLP, we can get higher precision and recall than unscaled BLP scheme and NoBP especially when using larger neighbor size.


## 3.1. Experimental Settings

We use a MovieLens latest dataset in our experiments, including 100,000 ratings and 6,100 tag applications applied to 10,000 movies by 700 users [25]. There are four files for each dataset: links, movies, ratings, and tags. We use these files to get different context information. We compare several different methods in our experiments, the names and meanings of which are shown in Table 1.Table 1
The meanings of different methods’ names.
Name
Baseline predictor
Similarity
NoBP-Cos/PC
No
Cosine/Pearson’s Correlation
USBP-Cos/PC
Unscaled BP
Cosine/Pearson’s Correlation
RDA-Cos/PC
RDA
Cosine/Pearson’s Correlation
CDA-Cos/PC
CDA
Cosine/Pearson’s Correlation
TDA-Cos/PC
TDA
Cosine/Pearson’s Correlation
LDAU-Cos/PC
LDAU
Cosine/Pearson’s Correlation
LDAI-Cos/PC
LDAI
Cosine/Pearson’s CorrelationThe total methods compared are defined in Table1. There are two similarity weight functions in our experiments: Cosine and Pearson’s Correlation. The neighborhood sizes of item-based models are all set to 20, while they are 100 for user-based models. Values of k in (11)~(15) are the same, 6 in default. The values of g are also the same for these different methods, 20 in default. We randomly split the dataset into 5 parts and use cross-validation to train and test the models.For topN metric (e.g., precision and recall), we randomly select 100 items on the testing as the candidates, excluding the ones appearing in the training. Only the items rated above 3.5 (including 3.5) are recommended.The neighborhood collaborative filter models always incur a high memory cost. So we use a 16 GB RAM to run different NHCF algorithms.


## 3.2. Experimental Metrics

Five metrics are used in our experiments: precision, recall, RMSE (Root Mean Squared Error), MAE (Mean Absolute Error), and nDCG (Normalized Cumulative Discounted Gain).For a test datasetτ, denote by TP the set of recommend items which the users are really interested in, denote by FP the set of recommend items which the users are not interested in, denote by FN the set of not recommend items which the users are interested in, and denote by TN the set of not recommend items which the users are not interested in. The metrics of precision and recall are defined, respectively, as follows:(16)precision=TPTP+FP,recall=TPTP+FN.The recommendation system generates predicted ratingsr^ui for a test set τ of user-item pairs (u,i) for which the true ratings rui are known. The RMSE and MAE between the actual ratings are given by(17)RMSE=1τ∑u,i∈τr^ui-rui2,MAE=1τ∑u,i∈τr^ui-rui.The recommendation systems always present to the user a list of recommendations, imposing a certain natural browsing order. In many cases, we are not interested in predicting an explicit rating or selecting a set of recommended items, as in the previous sections; rather we are interested in ordering items according to the user’s preferences. nDCG is a measure from information retrieval, where positrons are discounted algorithmically. Assuming that each useru has a “gain” gui from being recommended an item i, the average Discounted Cumulative Gain (DCG) for a list of J items is defined as (18)DCG=1N∑u=1N∑j=1Jguijmax⁡1,logbj,where the logarithm base is a free parameter, typically between 2 and 10. A logarithm with base 2 is commonly used to ensure that all positions are discounted. nDCG is just the normalized version of DCG:(19)nDCG=DCGDCG∗,where DCG∗ is the ideal DCG, the value of which ranges from 0 to 1. The larger the value is, the better the performance is.


## 3.3. Experimental Results

We change a little the format of the MovieLens dataset and import this dataset to a MySQL database. The coefficients of BLP can be conveniently calculated using some advanced SQL sentences. All of the coefficients of CASBLP methods are shown in Table2.Table 2
Values of scaling factors.
Method
α
β
RDA
0.8125
32.3833
CDA
0.8964
29.6461
TDA
0.7598
37
LDAU
0.6544
12.5643
LDAI
0.8083
29.8041The experimental comparison results are shown in Table3 (using Cosine similarity) and Table 4 (using Pearson’s Correlation). It seems that using Cosine is better than using Pearson’s Correlation in our experiments. Maybe this is because even if each user has different personal rating scale, the rating matrix is too sparse to become the major issue. When data is sparse, Cosine is always a good choice.Table 3
Experimental results using Cosine.
Method
Precision
Recall
RMSE
MAE
nDCG
NoBP-Cos
12.99%
20.62%
0.9465
0.9410
0.7237
USBP-Cos
19.82%
30.78%
0.9085
0.6939
0.9389
RDA-Cos
25.34%
39.01%
0.8984
0.6889
0.9485
CDA-Cos
25.05%
39.57%
0.8973
0.6869
0.9490
TDA-Cos
25.60%
40.03%
0.8999
0.6901
0.9488
LDAU-Cos
26.15%
40.80%
0.9003
0.6904
0.9495
LDAI-Cos
25.30%
39.45%
0.8979
0.6886
0.9485Table 4
Experimental results using Pearson’s Correlation.
Method
Precision
Recall
RMSE
MAE
nDCG
NoBP-PC
12.93%
20.34%
1.2229
0.9271
0.9109
USBP-PC
20.01%
30.35%
0.9355
0.7169
0.9348
RDA-PC
25.24%
38.38%
0.9603
0.7440
0.9306
CDA-PC
24.65%
36.90%
0.9483
0.7340
0.9311
TDA-PC
25.19%
38.40%
0.9709
0.7522
0.9300
LDAU-PC
26.65%
40.93%
0.9856
0.7590
0.9327
LDAI-PC
25.19%
38.34%
0.9596
0.7434
0.9307From Table3, we can see that when not using normalization scheme (NoBP) all of the metrics are much worse than the others. The unscaled BLP is even better than NoBP, in which the precision increases by about 7%, recall increases by more than 10%, and RMSE decreases by 4%. It is surprising that only using the simple unscaled BLP the MAE increases by 15% and the nDCG increases by more than 20%. Because recommendation order has a great commercial significance, the normalization is an important improvement in recommendation system. Our context-aware scaled BLP normalization schemes make further improvement, mainly on the precision and recall metrics. From both Tables 3 and 4, CASBLP normalization has almost the same RMSE, MAE, and nDCG as the USBP, sometimes even little worse than USBP. But, for a commercial recommendation system, what the users care about is whether the RSs recommend what they really need. The production selling would benefit from even a 1% improvement on precision or recall. The precision of our CASBLP schemes increases by about 5%, and the recall increases by about 8%, which is a great improvement from the commercial perspective.An important problem is that the coefficients we used have optimal values. So we changeα from 0 to 1 and β from 0 to 200 to see the changes of the performance. Figures 4–6 show the impact of scaled factors on RMSE, precision, and recall, respectively.Figure 4
Impact of scaled factors on RMSE.Figure 5
Impact of scaled factors on precision.Figure 6
Impact of scaled factors on recall.For all these three metrics, the optimum ofβ is near 20, at which the RMSE is the lowest and the precision and recall are the highest. What is interesting is that any shrinking of α can improve precision and recall, even if we set α to zero. However, shrinking α would cause a slightly higher RMSE except at the value near 0.8.This means thatα can control the accuracy of the rating prediction, but when α has shrunk, β plays a crucial role in items recommendation. What causes this phenomenon is that maybe the mean rating is computed in terms of all the users, which involves the global information, while the biases are computed in terms of only very few similar neighbors, which involves the local information. For the personalized recommendation systems, the local information is much more important, and an ordinary average prediction has little meaning. That is why even if we set α to 0 and only using the item biases we can also get a passable prediction performance.The neighbor size is an important factor in the neighborhood-based recommendation systems, for item-based or user-based ones. We increase the neighbor size geometrically from 5 to 320. Figures7, 8, and 9 show the change of recommendation performance including precision, recall, and RMSE, respectively.Figure 7
Impact of neighborhood size on precision.Figure 8
Impact of neighborhood size on recall.Figure 9
Impact of neighborhood size on RMSE.What we can see from Figure9 is consistent with what we have concluded from Tables 3 and 4. Whether using scaled BLP or unscaled BLP, we can get similar RMSE, which are all much lower than the NoBP scheme. With the growth of the neighbor size, all the RMSE are trending toward stability.What surprised us is the results of precision and recall. Both metrics are increasing until reaching the stable values with the growth of neighbor size except the NoBP scheme, the precision and recall of which decrease to the stable values. This is due to the fact that, maybe without normalization, the prediction lacks personalization and causes too many more decoys to choose from.Figures7 and 8 also show the results which are consistent with Tables 3 and 4. Just slightly changing the coefficients of BLP, we can get higher precision and recall than unscaled BLP scheme and NoBP especially when using larger neighbor size.


## 4. Conclusions

Rating normalization is an important step when designing collaborative filter recommendation systems, especially for the item-based ones which play a key role in the domain of online commercial business. Using the baseline predictor for normalization considers both the global information and local information. Although we found that balancing them can improve the recommendation performance, there is no clear way of determining the weight of these two sources of information. In this paper, we proposed some context-aware scaled BLP schemes, which compute the weights of mean ratings and biases, respectively, in terms of different context information. What we concluded from the experiments not only verified the advantage of scaled BLP but also pointed out the different roles of each part of BLP. This paper only studied the BLP normalization of item-based collaborative filter system on a sole MovieLens dataset. The user-based and matrix factorization models actually are much different from item-based ones, the details of which we will explore in the future work using some different and larger recommendation dataset.



---

*Source: 6562371-2017-04-05.xml*