# Investigating the Temporal Effect of User Preferences with Application in Movie Recommendation

Authors: Wen-Jun Li; Qiang Dong; Yan Fu
Journal: Mobile Information Systems
 (2017)

---

## Abstract

As the rapid development of mobile Internet and smart devices, more and more online content providers begin to collect the preferences of their customers through various apps on mobile devices. These preferences could be largely reflected by the ratings on the online items with explicit scores. Both of positive and negative ratings are helpful for recommender systems to provide relevant items to a target user. Based on the empirical analysis of three real-world movie-rating data sets, we observe that users’ rating criterions change over time, and past positive and negative ratings have different influences on users’ future preferences. Given this, we propose a recommendation model on a session-based temporal graph, considering the difference of long- and short-term preferences, and the different temporal effect of positive and negative ratings. The extensive experiment results validate the significant accuracy improvement of our proposed model compared with the state-of-the-art methods.


---

## Body

## 1. Introduction

Nowadays, a huge ecosystem of independent content providers (such as Facebook, Netflix, Google Maps, and Snapchat) and consumers (web users) is emerging on the mobile Internet. Confronted with the problem of finding a needle in the haystack, many web users usually resort to information filtering technology to find more relevant contents. Nowadays, recommender systems have been deployed on the websites of many industries [1], to make the web services more suitable and engaged to their users and promote the scale and profitability of such businesses [2]. In the recent decades, recommender systems have received considerable research attention in the literature, and many effective recommendation approaches have been proposed, such as social network-based recommendation models [3], graph-based recommendation models [4, 5], and context aware recommendation models [6, 7]; a recent and up-to-date review can be found in the works of Lu et al. [8].Many of these works are focused on movie recommendation or based on movie-rating data sets [9, 10]. Typically, in online video-watching websites with recommender systems, users are asked to rate movies with discrete scores to express their individual opinions, where a high score usually indicates user preference on this movie. Take https://www.netflix.com as an example, users are suggested to rate movies and TV shows (items in general) in a rating scale from 1 star to 5 stars, where one star means “Hate It,” and five stars mean “Love It.” This kind of explicit feedbacks can largely reflect user preferences. Even if a user dislikes a movie after watching it, he might be attracted by its title, cast, director, genres, or others; otherwise he would never watch it. Hence, the negative ratings indicate many useful information and thus should not be neglected or simply considered to be negative. Many works have shown that both of positive and negative opinions are effective to make effective recommendations.First, given a rating scale where the highest score denotes the most positive opinion and the lowest score indicates the most negative opinion, users’ rating scores do not distribute evenly along the whole rating scale [11]. Second, different users may have different rating criterions, some good-tempered users are willing to give high scores whereas other critical people seldom give full marks to any items they have watched [12]. Last but not least, the negative ratings indicate dislike and simultaneously relevance, and they may play an either negative or positive role depending on the sparsity of training set and the popularity of the corresponding items [13].As the mobile platforms become more and more user friendly, computationally powerful, and readily available, online content providers have begun to develop mobile apps to offer more personalized contents. People can watch their favorite movies and TV shows wherever and whenever they have a break. This mobile feature poses a new challenge to recommendation systems. Most of previous works do not consider the temporal difference in the rating criterions of users. According to the memory effect of movie watching behavior [14] and the anchoring bias phenomena of movie-rating behavior [15], the current rating of one user will be influenced by his previous watching and rating history. Therefore, individual rating criterions may vary in different periods, depending on the previous items he has watched. Besides, a user’s negative ratings may have a different temporal influence from his positive ratings on his future preference.In this paper, we empirically analyze three typical data sets created by popular online video services (MovieLens, Netflix, and MovieTweetings) with focus on the temporal effects of the rating behavior of each individual user. We concentrate on the time-varying rating criterion and different temporal effects of positive and negative ratings on future behavior. We propose a session-based recommendation model taking into account these temporal characteristics of user ratings. Compared with five state-of-the-art methods on the aforementioned movie-rating date sets, our proposed model is validated to give more accurate prediction of user preference.


## 2. Empirical Analysis

In this section, we analyze empirically the temporal difference in users’ rating criterions and the temporal effects of positive and negative ratings, with the hope of understanding the temporal characteristics of users’ rating behaviors and verifying the following two assertions.Assertion I. The rating criterion of a user varies over time.Assertion II. The positive and negative ratings of a user have different temporal influences on his future preference.For the convenience of readers, we list all the notations used in this paper in “Notations.”


### 2.1. Data Sets

Three real-world data sets, MovieLens, Netflix, and MovieTweetings [18], are employed in this paper. The MovieLens data were collected by the GroupLens Research Project at University of Minnesota, through the MovieLens website (https://movielens.umn.edu) during the seven-month period from September 19, 1997, to April 22, 1998. It consists of 943 users and 1682 movies, and 105 discrete rating records from 1 star to 5 stars. The Netflix data is random sampling from the original Netflix data set provided by http://Netflixprize.com. It is composed of 97367 rating scores of 3000 users on 3000 movies from January 2005 to May 2005. The MovieTweetings is a data set consisting of ratings on movies contained in well-structured tweets on Twitter. By removing users who rate less than 10 movies from the snapshots with 100 K records, the MovieTweetings data set consists of 67040 ratings of 2583 users on 9111 movies from February 28, 2013, to September 2, 2013. The basic statistics of these data sets are presented in Table 1.Table 1
Basic statistics of three data sets. The sparsity is defined as|E|/m∗n, where |E| is the number of ratings and m and n denote the numbers of users and items.
Data set
# users
# items
# links
Sparsity
Rating scale
MovieLens
943
1682
100000
6.3×10-2
1–5
Netflix
3000
3000
97367
1.08×10-2
1–5
MovieTweetings
2583
9111
67040
2.85×10-3
1–10


### 2.2. The Rating Criterion

In this paper, we investigate users’ rating criterions in two aspects:average rating score andrating scale. Specifically, we consider the monthly average rating score and rating scale of each user as two independent random variables and estimate their standard deviations across months. To obtain a reliable estimation, we consider only the users who are active in more than 2 months of the whole period. Figures 1(a), 1(b), and 1(c) show the distributions of standard deviation of average rating scores for MovieLens, Netflix, and MovieTweetings data sets, respectively. The mean values of the deviations for three data sets (0.36427, 0.56429, and 0.79849) are all significantly greater than 0 (pvalue~0, obtained by one-sided t-test). Similarly, Figures 1(d), 1(e), and 1(f) show the distributions of standard deviation of users’ rating scales. The mean values for MovieLens, Netflix, and MovieTweetings are 0.93737, 0.93495, and 1.05155, respectively (pvalue~0, obtained by one-sided t-test). These observations indicate that every user has a significantly changing rating criterion over time,empirical evidence of Assertion I.Figure 1
The distributions of standard deviation of average rating scores and users’ rating scales for MovieLens, Netflix, and MovieTweetings data sets, respectively.
(a)
(b)
(c)
(d)
(e)
(f)


### 2.3. The Positive and Negative Ratings

Note that the rating criterion on items varies from person to person; we take the median scorer-i=rimax+rimin/2 of each individual user ui, instead of the median score of systematic rating scale, to distinguish his ownpositive rating (rating score no less than r-i) andnegative rating (rating score less than r-i).We usesession to represent a continuous period of user activity; thus the records of user ui can be divided into several sequential sessions Si={Si,t1,Si,t2,…,Si,tn}. In this paper, the sessions are divided by month; that is to say, two ratings of the same user are in the same session if and only if they occur in the same month. For a user ui, the items rated with positive ratings by user ui in session Si,tk constitute hispositive item setPi,tk, and thenegative item setNi,tk is similarly defined. For a target user ui, we take his latest positive item set Pi,tn as future preference, and all the previous positive and negative item sets Pi,tk and Ni,tk are treated as previous interests, k=1,2,…,n-1.The correlationCor(A,B) between two item sets A and B is defined as the averaged cosine similarity on all item pairs, where one item is from A and the other is from B. Figure 2 plots the correlation Cor(Pi,tn,Pi,tk) (the black line) and Cor(Pi,tn,Ni,tk) (the red line) against the time gap |tn-tk|, of course averaged over all users, for MovieLens, Netflix, and MovieTweetings data sets. We can see that the future preference of a user is clearly more influenced by his positive ratings than the negative ratings in the past. From the temporal point of view, the bigger the time gap is, the less influenced the future preference is by the previous positive/negative ratings. However, the decay rates of influences of positive and negative opinions vary for different data sets. For MovieLens, the influence of positive ratings on future preference is more stable than negative ratings (σpositive=0.00584,σnegative=0.02325), while, for Netflix, the decay rates of influences of positive and negative ratings are very similar to each other (σpositive=0.00747,σnegative=0.00912).Figure 2
The temporal influence of user’s positive and negative opinions for MovieLens, Netflix, and MovieTweetings. The black one and red one represent user’s positive and negative opinions, respectively.
(a)
MovieLens
(b)
Netflix
(c)
MovieTweetingsSince the first and the last sessions contain data of only 1 day and 2 days for MovieTweetings data set, we ignore the last points of curves with time gap of 6 months. Different from above observations, we find that the influence of negative ratings is more stable than that of positive ratings in MovieTweetings (σpositive=0.01174,σnegative=0.00319). Therefore, users’ positive and negative ratings have different temporal influences on his future preferences,empirical evidence of Assertion II.


## 2.1. Data Sets

Three real-world data sets, MovieLens, Netflix, and MovieTweetings [18], are employed in this paper. The MovieLens data were collected by the GroupLens Research Project at University of Minnesota, through the MovieLens website (https://movielens.umn.edu) during the seven-month period from September 19, 1997, to April 22, 1998. It consists of 943 users and 1682 movies, and 105 discrete rating records from 1 star to 5 stars. The Netflix data is random sampling from the original Netflix data set provided by http://Netflixprize.com. It is composed of 97367 rating scores of 3000 users on 3000 movies from January 2005 to May 2005. The MovieTweetings is a data set consisting of ratings on movies contained in well-structured tweets on Twitter. By removing users who rate less than 10 movies from the snapshots with 100 K records, the MovieTweetings data set consists of 67040 ratings of 2583 users on 9111 movies from February 28, 2013, to September 2, 2013. The basic statistics of these data sets are presented in Table 1.Table 1
Basic statistics of three data sets. The sparsity is defined as|E|/m∗n, where |E| is the number of ratings and m and n denote the numbers of users and items.
Data set
# users
# items
# links
Sparsity
Rating scale
MovieLens
943
1682
100000
6.3×10-2
1–5
Netflix
3000
3000
97367
1.08×10-2
1–5
MovieTweetings
2583
9111
67040
2.85×10-3
1–10


## 2.2. The Rating Criterion

In this paper, we investigate users’ rating criterions in two aspects:average rating score andrating scale. Specifically, we consider the monthly average rating score and rating scale of each user as two independent random variables and estimate their standard deviations across months. To obtain a reliable estimation, we consider only the users who are active in more than 2 months of the whole period. Figures 1(a), 1(b), and 1(c) show the distributions of standard deviation of average rating scores for MovieLens, Netflix, and MovieTweetings data sets, respectively. The mean values of the deviations for three data sets (0.36427, 0.56429, and 0.79849) are all significantly greater than 0 (pvalue~0, obtained by one-sided t-test). Similarly, Figures 1(d), 1(e), and 1(f) show the distributions of standard deviation of users’ rating scales. The mean values for MovieLens, Netflix, and MovieTweetings are 0.93737, 0.93495, and 1.05155, respectively (pvalue~0, obtained by one-sided t-test). These observations indicate that every user has a significantly changing rating criterion over time,empirical evidence of Assertion I.Figure 1
The distributions of standard deviation of average rating scores and users’ rating scales for MovieLens, Netflix, and MovieTweetings data sets, respectively.
(a)
(b)
(c)
(d)
(e)
(f)


## 2.3. The Positive and Negative Ratings

Note that the rating criterion on items varies from person to person; we take the median scorer-i=rimax+rimin/2 of each individual user ui, instead of the median score of systematic rating scale, to distinguish his ownpositive rating (rating score no less than r-i) andnegative rating (rating score less than r-i).We usesession to represent a continuous period of user activity; thus the records of user ui can be divided into several sequential sessions Si={Si,t1,Si,t2,…,Si,tn}. In this paper, the sessions are divided by month; that is to say, two ratings of the same user are in the same session if and only if they occur in the same month. For a user ui, the items rated with positive ratings by user ui in session Si,tk constitute hispositive item setPi,tk, and thenegative item setNi,tk is similarly defined. For a target user ui, we take his latest positive item set Pi,tn as future preference, and all the previous positive and negative item sets Pi,tk and Ni,tk are treated as previous interests, k=1,2,…,n-1.The correlationCor(A,B) between two item sets A and B is defined as the averaged cosine similarity on all item pairs, where one item is from A and the other is from B. Figure 2 plots the correlation Cor(Pi,tn,Pi,tk) (the black line) and Cor(Pi,tn,Ni,tk) (the red line) against the time gap |tn-tk|, of course averaged over all users, for MovieLens, Netflix, and MovieTweetings data sets. We can see that the future preference of a user is clearly more influenced by his positive ratings than the negative ratings in the past. From the temporal point of view, the bigger the time gap is, the less influenced the future preference is by the previous positive/negative ratings. However, the decay rates of influences of positive and negative opinions vary for different data sets. For MovieLens, the influence of positive ratings on future preference is more stable than negative ratings (σpositive=0.00584,σnegative=0.02325), while, for Netflix, the decay rates of influences of positive and negative ratings are very similar to each other (σpositive=0.00747,σnegative=0.00912).Figure 2
The temporal influence of user’s positive and negative opinions for MovieLens, Netflix, and MovieTweetings. The black one and red one represent user’s positive and negative opinions, respectively.
(a)
MovieLens
(b)
Netflix
(c)
MovieTweetingsSince the first and the last sessions contain data of only 1 day and 2 days for MovieTweetings data set, we ignore the last points of curves with time gap of 6 months. Different from above observations, we find that the influence of negative ratings is more stable than that of positive ratings in MovieTweetings (σpositive=0.01174,σnegative=0.00319). Therefore, users’ positive and negative ratings have different temporal influences on his future preferences,empirical evidence of Assertion II.


## 3. Recommendation Model

Based on the session-based temporal graph (STG) introduced by Xiang et al. [4], we propose a session-based recommendation model with the temporal effect of user preferences (STeuP), which is an enhanced version of the Injected Preference Fusion (IPF) model associated with STG. Users and items are represented by user nodes u∈U and movie nodes o∈O, respectively. To represent users’ ratings at different periods, we associate a session node Si,tk to the movies rated by user ui in this session. These three types of nodes are connected by weighted directed edges, namely, EU,O, EO,U, EO,S, and ES,O. The edges affiliated to session nodes reflect the short-term rating criterions of users, while the edges affiliated to user nodes reflect users’ long-term preferences. Figure 3 gives an example of session-based temporal graph.Figure 3
The example of session-based temporal graph with rating information.To eliminate the effect of different rating criterions of different individuals, the rating score of a user is normalized according to his own rating scale:(1)Riα=riα-riminrimax-rimin,which reflects users’ long-term rating criterions. In this way, the rating scores of all users can be strictly regulated to [0,1], where the maximum rating score of each user is set to 1 and the minimum rating score is fixed on 0.Since the short-term rating criterion of a user varies at different periods, we normalize his rating score in a particular sessionSi,tk by (2)RiαSi,tk=riα-rSi,tkminrSi,tkmax-rSi,tkmin.Recall that our recommendation task is to recommend movies for a target user to watch in the future. Of course, the rating whose occurrence time is closer to the target timeT is more useful to the recommendation task. Since the temporal influences of positive and negative ratings may be different, following previous works [19, 20], we use two exponential functions to model the relevance of positive and negative ratings at time tiα with user’s preference at the target time T. Hence, edge weights in EU,O and EO,U are defined as (3)wi,α=wα,i=Riα·e-λT-tiαifRiα≥rimax+rimin2Riα·e-μT-tiαifRiα<rimax+rimin2.Similarly in a specified session, the rating whose occurrence time is closer to the target time T is more important in this session. We use the same exponential functions to model the temporal influences of positive and negative ratings in a session, and the median rating value in this session is taken to distinguish positive and negative ratings. Thus, the edge weights of ES,O and EO,S are calculated by(4)wSi,tk,α=wα,Si,tk=RiαSi,tk·e-λT-tkifRiαSi,tk≥rSi,tkmax+rSi,tkmin2RiαSi,tk·e-μT-tkifRiαSi,tk<rSi,tkmax+rSi,tkmin2.After setting the initial edge weights of STG, we normalize these edge weights as follows:(5)ψv,v′=wv,v′∑x∈Nvwv,xifv∈U∪S,v′∈Oηwv,v′η∑x∈Nv∩Uwv,x+∑k∈Nv∩Swv,xifv∈O,v′∈Uwv,v′η∑x∈Nv∩Uwv,x+∑k∈Nv∩Swv,xifv∈O,v′∈S.A larger η indicates that users’ long-term preferences play a more important role in preference propagation.Given a target userui, the basic idea of the preference propagation is to first inject initial preference on both the user node ui and his latest session node and then propagate the preference to candidate movie nodes through various paths in the graph. As defined in [4], the preference propagated by each path p is the production of the initial preference γ(v0) assigned to the target user node ui (or the latest session node Si,n) and the weights of all edges on the path: (6)ϕp=∏ev,v′∈Pwv,v′γv0.γ(v0) depends on the node type: (7)γv0=βifv0=ui1-βifv0=si,n,where β=0 means no preference is injected into the user node, while β=1 means no preference is injected into the session node. Similar to the previous work [4], we consider only the shortest paths (distance = 3) from source node to unknown movie nodes, which can be obtained effectively by Bread-First-Search. Consequently, we use Piα to represent the set of shortest paths from source nodes to an unknown movie node oα for user ui, and the estimated preference ϕiα of user ui on movie oα is then measured as (8)ϕiα=∑p∈Piαϕp,where ϕ(p) is the weight of path p defined as (6). The top-ranked movies sorted by preference value are then recommended.


## 4. Experiment Results

### 4.1. Evaluation Metrics

In order to predict users’ future preferences based on the past interaction records, all the records are listed in ascending order of rating time. We take the records occurred in the latest 30 days as the probe setEP and the remaining records as the training set ET for all data sets. The training set is treated as known information, while no information from the probe set is allowed to be used for recommendation. Moreover, we denote the latest time among the training set as the target time T. In this paper, four typical metrics are employed to evaluate the accuracy, diversity, novelty, and coverage of recommendation results.


#### 4.1.1. Accuracy

Accuracy is one of the most important evaluation metrics of a recommendation system. Both Precision and Recall could be used to measure the accuracy of the recommendation. PrecisionP is the fraction of recommended items that are relevant, while Recall R is defined as the ratio of the number of relevant items in the recommendation list to the number of preferred items in the probe set. However, Precision and Recall seem to be two sides of the seesaw; that is to say, given a fixed length of recommendation list, when one end rises, the other end falls. The F1 measure is proposed to find a suitable trade-off between Precision and Recall, which is defined as (9)F1=2×P×RP+R,where P=1/|U|∑i=1|U|‍hi/L and R=1/|U|∑i=1|U|‍hi/nip, where |U| is the number of users, hi is the number of relevant items in the recommendation list of ui, and nip is the number of all preferred items in the probe set of user ui. Generally speaking, for a given length L of recommendation list, the method with higher F1 value is the better one.


#### 4.1.2. Diversity

Diversity is used to measure the difference between recommendation lists of different users. An excellent algorithm should recommend as widely distributed items as possible, because people are glad to get personalized suggestions. We use the Hamming distanceHij to measure the diversity of recommendation lists, (10)Hij=1-qijL,where qij is the number of common items in the recommendation lists of user ui and user uj. Hij=0, if ui and uj get identical recommendation list consisting of L items. Diversity is defined as the mean value of Hamming distance: (11)DiversityL=1UU-1∑i≠jHij.


#### 4.1.3. Novelty

Novelty quantifies the capacity of a method to generate novel and unexpected recommendations, which may be greatly contributed by less popular items (i.e., items of low degree) that are unlikely to be known previously. It can be simply measured as the average degree of the recommended items. Specifically, for a target userui whose top-L recommendation list is denoted by Li, his novelty is defined as [21] (12)NoveltyiL=1L∑α∈Likα.Averaging over the novelty of all users, we obtain the novelty of the system.


#### 4.1.4. Coverage

Coverage measures the percentage of items that an algorithm is able to recommend to users. It can be calculated as the ratio of the number of distinct items in the users’ lists to the total number of items in the system, which reads(13)Coverage=1O∑i=αnδα,where |O| is the number of items in set O, δα=1 only if item oα is recommended to at least one user (i.e., oα is in at least one user’s list), and otherwise δα=0. Undoubtedly, recommending more popular items will result in lower coverage.


### 4.2. Parameter Adjustment

Before comparing the proposed model with the baseline methods, we investigate the impacts of the parametersλ, μ, β, and η on the performance of the STeuP model. As we see in Section 2.3, the temporal effect of positive and negative opinions may be different in different online websites. Thus, we first examine the effect of parameters λ and μ, which govern the decay rates of temporal influence of positive and negative opinions on users’ future preference. The bigger the parameters λ and μ are, the less affected the future behaviors are by users’ past positive and negative opinions. Without loss of generality, we set η=1 and β=0.5 when tuning λ and μ.Figures4(a), 4(b), and 4(c) plot the heat map of F1 against parameters λ and μ for MovieLens, Netflix, and MovieTweetings, respectively. The log-λ is along the x-axis while the y-axis is for log-μ. The different F1 values along the z-axis are indicated by different colors. Firstly, we observe that the F1 is more sensitive to μ than λ; that is, given a fixed value of λ, the changing range of F1 is much bigger when traversing the parameter μ. Secondly, the results on all data sets show that there is an obvious “ridge” along the x-axis, where we can get the optimal F1 value. Hence, we can firstly fix λ to a small value (10-2~10-3) and tune the parameter μ to find the local optimal value, and then fix μ and adjust λ to find the globally optimal accuracy.Figure 4
The heat map ofF1 against parameters λ and μ on MovieLens, Netflix, and MovieTweetings.
(a)
MovieLens
(b)
Netflix
(c)
MovieTweetingsBy setting the values ofλ and μ to 0, we can get the recommendation results without temporal influence, which are presented in Table 2. We can see that consideration of temporal influence by weighting users’ positive and negative opinions with different temporal decay rates leads to performance improvements. From the values of parameters λ and μ when we get the optimal F1, we can find that the decay rate of temporal effect of positive opinions is much smaller than that of negative opinions on MovieLens, but it is bigger than that of negative opinions for MovieTweetings. For Netflix, the decay rates of positive and negative opinions are almost the same. This validates again our inference on the different temporal influences of positive and negative opinions on three data sets in Section 2.3.Table 2
Performance comparison of STeuP model distinguishing the temporal influence of positive and negative ratings on MovieLens, Netflix, and MovieTweetings.
Data set
λ
μ
F
1
HD
Novelty
Coverage
MovieLens
0.0
0.0
0.1697
0.7946
306.37
0.1058
0.007
0.03
0.2148
0.7647
275.18
0.1285
Netflix
0.0
0.0
0.0770
0.6848
600.66
0.2976
0.009
0.009
0.0930
0.6757
555.41
0.3067
MovieTweetings
0.0
0.0
0.0689
0.6869
381.43
0.2084
0.09
0.02
0.0783
0.6582
344.52
0.2100In our STeuP model, parameterβ controls the ratio of injected preferences into user nodes against session nodes. If β equals 0, no preference is injected into the user node; if β equals 1, no preference is injected into the session node. Thus, parameter β is used to balance the effect of long-term and short-term interests in the initial phase, where the larger β is, the stronger the influence of long-term preferences is. The results of how accuracy changes against β for three data sets are shown in Figure 5. Firstly, the results show that ignoring long-term preferences (β=0) cannot generate good results. Secondly, in a sparser data set, the β value for the optimal F1 is bigger. Generally speaking, optimal results can be obtained by combing long-term and short-term interests together. In the next discussion, we fix β to 0.5, 0.9, and 1.0 for MovieLens, Netflix, and MovieTweetings data sets, respectively.Figure 5
TheF1 against parameter β on MovieLens, Netflix, and MovieTweetings.
(a)
MovieLens
(b)
Netflix
(c)
MovieTweetingsParameterη is used to balance the influence of long-term and short-term preferences in the process of preference propagation. η=0 means item nodes are only connected to users nodes and item-item similarity depends only on users’ long-term preference and vice versa. Figures 6(a), 6(b), and 6(c) plot the change of F1 against parameter η on three data sets. As the x-axis is for the logarithmic value of η, we can see that, for MovieLens and Netflix data sets, a parameter η close to 1 is corresponding to the optimal F1, while the optimal value of η for MovieTweetings is close to 102. This observation verifies that both users’ long-term and short-term opinions are important to measure item similarity. Furthermore, users’ long-term opinions are more important than short-term opinions on sparse data sets.Figure 6
F
1 against parameter η on MovieLens, Netflix, and MovieTweetings.
(a)
MovieLens
(b)
Netflix
(c)
MovieTweetings


### 4.3. Comparison of Methods

We compare our proposed model with other five models listed in Table3. The mark √ in the table indicates whether a model distinguishes user ratings as positive and negative opinions and/or considers temporal influence.UCF is an important collaborative filtering method which calculates the similarity between users based on the rating information.NBI is a network-based inference algorithm which can provide more efficient and effective recommendation than collaborative filtering. Both of the methods do not distinguish user ratings as positive and negative opinions or consider temporal influence.UOS is an improved user-based collaborative filtering model which estimates the similarity between users based on the spreading process of users’ positive and negative opinions on user-item bipartite networks.SNBI is the enhanced version of NBI which assigns two different weights to the positive and negative opinions. UOS and SNBI distinguish users’ ratings as positive and negative opinions, but do not utilize temporal influence.IPF is the recommendation model proposed together with session-based temporal graph, which is based on binary data and distinguishes users’ long-term and short-term preferences.STeuP is our proposed model based on the two assertions in Section 2, which takes into account both of the temporal differences of users’ rating criterions and the different temporal effects of users’ positive and negative ratings.Table 3
The six recommendation models for comparison in this paper. The mark√ under PN or T indicates whether the model distinguishes opinions as positive and negative opinions and/or considers temporal influence.
Method
Description
PN
T
UCF
User-based CF [16]
—
—
UOS
User-based CF combining the user opinion spreading process [12]
√
—
NBI
Network-based inference algorithm on binary data [17]
—
—
SNBI
NBI with different weights for positive and negative opinions [13]
√
—
IPF
Personalized random walk on STG [4]
—
√
STeuP
The proposed model in Section3
√
√What is more, we also check the performance of a famous matrix factorization recommendation algorithm [22], which is very successful in rating prediction with the help of time information. However, the F1 value of this method on the aforementioned three data sets is all less than 0.001, perhaps because it does not apply to the situation of binary preference prediction. Hence, we do not present the results of the matrix factorization methods for comparison in this paper.Given the recommendation lengthL=10, the recommendation performance of these six methods for MovieLens, Netflix, and MovieTweetings is reported in Tables 4, 5, and 6, respectively.(i)
Collaborative filtering methods (UCF and UOS) can provide higher diversity, novelty, and coverage, but lower accuracy than graph-based methods (NBI and SNBI).(ii)
With the help of distinguishing users’ ratings into positive and negative opinions, both memory-based CF method and graph-based method can provide more accurate recommendation. TheF1 values of UOS and SNBI are both better than UCF and NBI, especially for the graph-based method. The diversity, novelty, and coverage of SNBI are all improved compared with NBI. However, for sparse data sets (MovieTweetings), UOS and SNBI cannot work well as expected. The results of SNBI are almost the same with that of NBI, while F1 of UOS is even worse than UCF.(iii)
The IPF model, which considers users’ long-term and short-term temporal influence, can provide quite good recommendation results for all data sets, except for the accuracy for Netflix.(iv)
The proposed method STeuP model performs the best with regard to accuracy for all data sets. Besides, it can provide better diversity, novelty, and coverage than graph-based methods, especially for the sparse data sets (Netflix and MovieTweetings).Table 4
Comparison of different recommendation models on MovieLens data set. For UOS,λ=0.2; for SNBI, λ=-2.1; for MS-IPF, β=0.1, ρ=1.5, and η=1.0; for STeuP, β=0.5, λ=0.007, μ=0.03, and η=1.0. The length of recommendation list is L=10.
Algorithm
F1
HD
Novelty
Coverage
UCF
0.0761
0.9399
224.63
0.2854
UOS
0.0839
0.8735
268.10
0.1691
NBI
0.1081
0.7724
319.62
0.0873
SNBI
0.1144
0.8382
287.57
0.1353
IPF
0.1649
0.8010
281.11
0.1667
STeuP
0.2147
0.7647
275.18
0.1285Table 5
Comparison of different recommendation models on Netflix data set. For UOS,λ=0.0; for SNBI, λ=-1.3; for MS-IPF, β=0.5, ρ=1.1, and η=10; for STeuP, β=0.9, λ=0.009, μ=0.009, and η=1.0. The length of recommendation list is L=10.
Algorithm
F
1
HD
Novelty
Coverage
UCF
0.0732
0.8876
453.55
0.2720
UOS
0.0733
0.7638
546.90
0.1666
NBI
0.07524
0.5908
677.00
0.0942
SNBI
0.0794
0.6057
657.37
0.1441
IPF
0.0783
0.6607
636.08
0.2084
STeuP
0.095
0.6169
589.88
0.2358Table 6
Comparison of different recommendation models on MovieTweetings data set. For UOS,λ=-0.2; for SNBI, λ=-0.9; for MS-IPF, β=0.1, ρ=1.5, and η=1.0; for STeuP, β=1.0, λ=0.09, μ=0.02, and η=100. The length of recommendation list is L=10.
Algorithm
F
1
HD
Novelty
Coverage
UCF
0.0633
0.7966
335.17
0.1185
UOS
0.0490
0.7785
337.87
0.1837
NBI
0.0706
0.4881
468.30
0.0440
SNBI
0.0725
0.4999
463.43
0.0542
IPF
0.0785
0.5024
462.35
0.0447
STeuP
0.0865
0.5269
394.51
0.1341


## 4.1. Evaluation Metrics

In order to predict users’ future preferences based on the past interaction records, all the records are listed in ascending order of rating time. We take the records occurred in the latest 30 days as the probe setEP and the remaining records as the training set ET for all data sets. The training set is treated as known information, while no information from the probe set is allowed to be used for recommendation. Moreover, we denote the latest time among the training set as the target time T. In this paper, four typical metrics are employed to evaluate the accuracy, diversity, novelty, and coverage of recommendation results.


### 4.1.1. Accuracy

Accuracy is one of the most important evaluation metrics of a recommendation system. Both Precision and Recall could be used to measure the accuracy of the recommendation. PrecisionP is the fraction of recommended items that are relevant, while Recall R is defined as the ratio of the number of relevant items in the recommendation list to the number of preferred items in the probe set. However, Precision and Recall seem to be two sides of the seesaw; that is to say, given a fixed length of recommendation list, when one end rises, the other end falls. The F1 measure is proposed to find a suitable trade-off between Precision and Recall, which is defined as (9)F1=2×P×RP+R,where P=1/|U|∑i=1|U|‍hi/L and R=1/|U|∑i=1|U|‍hi/nip, where |U| is the number of users, hi is the number of relevant items in the recommendation list of ui, and nip is the number of all preferred items in the probe set of user ui. Generally speaking, for a given length L of recommendation list, the method with higher F1 value is the better one.


### 4.1.2. Diversity

Diversity is used to measure the difference between recommendation lists of different users. An excellent algorithm should recommend as widely distributed items as possible, because people are glad to get personalized suggestions. We use the Hamming distanceHij to measure the diversity of recommendation lists, (10)Hij=1-qijL,where qij is the number of common items in the recommendation lists of user ui and user uj. Hij=0, if ui and uj get identical recommendation list consisting of L items. Diversity is defined as the mean value of Hamming distance: (11)DiversityL=1UU-1∑i≠jHij.


### 4.1.3. Novelty

Novelty quantifies the capacity of a method to generate novel and unexpected recommendations, which may be greatly contributed by less popular items (i.e., items of low degree) that are unlikely to be known previously. It can be simply measured as the average degree of the recommended items. Specifically, for a target userui whose top-L recommendation list is denoted by Li, his novelty is defined as [21] (12)NoveltyiL=1L∑α∈Likα.Averaging over the novelty of all users, we obtain the novelty of the system.


### 4.1.4. Coverage

Coverage measures the percentage of items that an algorithm is able to recommend to users. It can be calculated as the ratio of the number of distinct items in the users’ lists to the total number of items in the system, which reads(13)Coverage=1O∑i=αnδα,where |O| is the number of items in set O, δα=1 only if item oα is recommended to at least one user (i.e., oα is in at least one user’s list), and otherwise δα=0. Undoubtedly, recommending more popular items will result in lower coverage.


## 4.1.1. Accuracy

Accuracy is one of the most important evaluation metrics of a recommendation system. Both Precision and Recall could be used to measure the accuracy of the recommendation. PrecisionP is the fraction of recommended items that are relevant, while Recall R is defined as the ratio of the number of relevant items in the recommendation list to the number of preferred items in the probe set. However, Precision and Recall seem to be two sides of the seesaw; that is to say, given a fixed length of recommendation list, when one end rises, the other end falls. The F1 measure is proposed to find a suitable trade-off between Precision and Recall, which is defined as (9)F1=2×P×RP+R,where P=1/|U|∑i=1|U|‍hi/L and R=1/|U|∑i=1|U|‍hi/nip, where |U| is the number of users, hi is the number of relevant items in the recommendation list of ui, and nip is the number of all preferred items in the probe set of user ui. Generally speaking, for a given length L of recommendation list, the method with higher F1 value is the better one.


## 4.1.2. Diversity

Diversity is used to measure the difference between recommendation lists of different users. An excellent algorithm should recommend as widely distributed items as possible, because people are glad to get personalized suggestions. We use the Hamming distanceHij to measure the diversity of recommendation lists, (10)Hij=1-qijL,where qij is the number of common items in the recommendation lists of user ui and user uj. Hij=0, if ui and uj get identical recommendation list consisting of L items. Diversity is defined as the mean value of Hamming distance: (11)DiversityL=1UU-1∑i≠jHij.


## 4.1.3. Novelty

Novelty quantifies the capacity of a method to generate novel and unexpected recommendations, which may be greatly contributed by less popular items (i.e., items of low degree) that are unlikely to be known previously. It can be simply measured as the average degree of the recommended items. Specifically, for a target userui whose top-L recommendation list is denoted by Li, his novelty is defined as [21] (12)NoveltyiL=1L∑α∈Likα.Averaging over the novelty of all users, we obtain the novelty of the system.


## 4.1.4. Coverage

Coverage measures the percentage of items that an algorithm is able to recommend to users. It can be calculated as the ratio of the number of distinct items in the users’ lists to the total number of items in the system, which reads(13)Coverage=1O∑i=αnδα,where |O| is the number of items in set O, δα=1 only if item oα is recommended to at least one user (i.e., oα is in at least one user’s list), and otherwise δα=0. Undoubtedly, recommending more popular items will result in lower coverage.


## 4.2. Parameter Adjustment

Before comparing the proposed model with the baseline methods, we investigate the impacts of the parametersλ, μ, β, and η on the performance of the STeuP model. As we see in Section 2.3, the temporal effect of positive and negative opinions may be different in different online websites. Thus, we first examine the effect of parameters λ and μ, which govern the decay rates of temporal influence of positive and negative opinions on users’ future preference. The bigger the parameters λ and μ are, the less affected the future behaviors are by users’ past positive and negative opinions. Without loss of generality, we set η=1 and β=0.5 when tuning λ and μ.Figures4(a), 4(b), and 4(c) plot the heat map of F1 against parameters λ and μ for MovieLens, Netflix, and MovieTweetings, respectively. The log-λ is along the x-axis while the y-axis is for log-μ. The different F1 values along the z-axis are indicated by different colors. Firstly, we observe that the F1 is more sensitive to μ than λ; that is, given a fixed value of λ, the changing range of F1 is much bigger when traversing the parameter μ. Secondly, the results on all data sets show that there is an obvious “ridge” along the x-axis, where we can get the optimal F1 value. Hence, we can firstly fix λ to a small value (10-2~10-3) and tune the parameter μ to find the local optimal value, and then fix μ and adjust λ to find the globally optimal accuracy.Figure 4
The heat map ofF1 against parameters λ and μ on MovieLens, Netflix, and MovieTweetings.
(a)
MovieLens
(b)
Netflix
(c)
MovieTweetingsBy setting the values ofλ and μ to 0, we can get the recommendation results without temporal influence, which are presented in Table 2. We can see that consideration of temporal influence by weighting users’ positive and negative opinions with different temporal decay rates leads to performance improvements. From the values of parameters λ and μ when we get the optimal F1, we can find that the decay rate of temporal effect of positive opinions is much smaller than that of negative opinions on MovieLens, but it is bigger than that of negative opinions for MovieTweetings. For Netflix, the decay rates of positive and negative opinions are almost the same. This validates again our inference on the different temporal influences of positive and negative opinions on three data sets in Section 2.3.Table 2
Performance comparison of STeuP model distinguishing the temporal influence of positive and negative ratings on MovieLens, Netflix, and MovieTweetings.
Data set
λ
μ
F
1
HD
Novelty
Coverage
MovieLens
0.0
0.0
0.1697
0.7946
306.37
0.1058
0.007
0.03
0.2148
0.7647
275.18
0.1285
Netflix
0.0
0.0
0.0770
0.6848
600.66
0.2976
0.009
0.009
0.0930
0.6757
555.41
0.3067
MovieTweetings
0.0
0.0
0.0689
0.6869
381.43
0.2084
0.09
0.02
0.0783
0.6582
344.52
0.2100In our STeuP model, parameterβ controls the ratio of injected preferences into user nodes against session nodes. If β equals 0, no preference is injected into the user node; if β equals 1, no preference is injected into the session node. Thus, parameter β is used to balance the effect of long-term and short-term interests in the initial phase, where the larger β is, the stronger the influence of long-term preferences is. The results of how accuracy changes against β for three data sets are shown in Figure 5. Firstly, the results show that ignoring long-term preferences (β=0) cannot generate good results. Secondly, in a sparser data set, the β value for the optimal F1 is bigger. Generally speaking, optimal results can be obtained by combing long-term and short-term interests together. In the next discussion, we fix β to 0.5, 0.9, and 1.0 for MovieLens, Netflix, and MovieTweetings data sets, respectively.Figure 5
TheF1 against parameter β on MovieLens, Netflix, and MovieTweetings.
(a)
MovieLens
(b)
Netflix
(c)
MovieTweetingsParameterη is used to balance the influence of long-term and short-term preferences in the process of preference propagation. η=0 means item nodes are only connected to users nodes and item-item similarity depends only on users’ long-term preference and vice versa. Figures 6(a), 6(b), and 6(c) plot the change of F1 against parameter η on three data sets. As the x-axis is for the logarithmic value of η, we can see that, for MovieLens and Netflix data sets, a parameter η close to 1 is corresponding to the optimal F1, while the optimal value of η for MovieTweetings is close to 102. This observation verifies that both users’ long-term and short-term opinions are important to measure item similarity. Furthermore, users’ long-term opinions are more important than short-term opinions on sparse data sets.Figure 6
F
1 against parameter η on MovieLens, Netflix, and MovieTweetings.
(a)
MovieLens
(b)
Netflix
(c)
MovieTweetings


## 4.3. Comparison of Methods

We compare our proposed model with other five models listed in Table3. The mark √ in the table indicates whether a model distinguishes user ratings as positive and negative opinions and/or considers temporal influence.UCF is an important collaborative filtering method which calculates the similarity between users based on the rating information.NBI is a network-based inference algorithm which can provide more efficient and effective recommendation than collaborative filtering. Both of the methods do not distinguish user ratings as positive and negative opinions or consider temporal influence.UOS is an improved user-based collaborative filtering model which estimates the similarity between users based on the spreading process of users’ positive and negative opinions on user-item bipartite networks.SNBI is the enhanced version of NBI which assigns two different weights to the positive and negative opinions. UOS and SNBI distinguish users’ ratings as positive and negative opinions, but do not utilize temporal influence.IPF is the recommendation model proposed together with session-based temporal graph, which is based on binary data and distinguishes users’ long-term and short-term preferences.STeuP is our proposed model based on the two assertions in Section 2, which takes into account both of the temporal differences of users’ rating criterions and the different temporal effects of users’ positive and negative ratings.Table 3
The six recommendation models for comparison in this paper. The mark√ under PN or T indicates whether the model distinguishes opinions as positive and negative opinions and/or considers temporal influence.
Method
Description
PN
T
UCF
User-based CF [16]
—
—
UOS
User-based CF combining the user opinion spreading process [12]
√
—
NBI
Network-based inference algorithm on binary data [17]
—
—
SNBI
NBI with different weights for positive and negative opinions [13]
√
—
IPF
Personalized random walk on STG [4]
—
√
STeuP
The proposed model in Section3
√
√What is more, we also check the performance of a famous matrix factorization recommendation algorithm [22], which is very successful in rating prediction with the help of time information. However, the F1 value of this method on the aforementioned three data sets is all less than 0.001, perhaps because it does not apply to the situation of binary preference prediction. Hence, we do not present the results of the matrix factorization methods for comparison in this paper.Given the recommendation lengthL=10, the recommendation performance of these six methods for MovieLens, Netflix, and MovieTweetings is reported in Tables 4, 5, and 6, respectively.(i)
Collaborative filtering methods (UCF and UOS) can provide higher diversity, novelty, and coverage, but lower accuracy than graph-based methods (NBI and SNBI).(ii)
With the help of distinguishing users’ ratings into positive and negative opinions, both memory-based CF method and graph-based method can provide more accurate recommendation. TheF1 values of UOS and SNBI are both better than UCF and NBI, especially for the graph-based method. The diversity, novelty, and coverage of SNBI are all improved compared with NBI. However, for sparse data sets (MovieTweetings), UOS and SNBI cannot work well as expected. The results of SNBI are almost the same with that of NBI, while F1 of UOS is even worse than UCF.(iii)
The IPF model, which considers users’ long-term and short-term temporal influence, can provide quite good recommendation results for all data sets, except for the accuracy for Netflix.(iv)
The proposed method STeuP model performs the best with regard to accuracy for all data sets. Besides, it can provide better diversity, novelty, and coverage than graph-based methods, especially for the sparse data sets (Netflix and MovieTweetings).Table 4
Comparison of different recommendation models on MovieLens data set. For UOS,λ=0.2; for SNBI, λ=-2.1; for MS-IPF, β=0.1, ρ=1.5, and η=1.0; for STeuP, β=0.5, λ=0.007, μ=0.03, and η=1.0. The length of recommendation list is L=10.
Algorithm
F1
HD
Novelty
Coverage
UCF
0.0761
0.9399
224.63
0.2854
UOS
0.0839
0.8735
268.10
0.1691
NBI
0.1081
0.7724
319.62
0.0873
SNBI
0.1144
0.8382
287.57
0.1353
IPF
0.1649
0.8010
281.11
0.1667
STeuP
0.2147
0.7647
275.18
0.1285Table 5
Comparison of different recommendation models on Netflix data set. For UOS,λ=0.0; for SNBI, λ=-1.3; for MS-IPF, β=0.5, ρ=1.1, and η=10; for STeuP, β=0.9, λ=0.009, μ=0.009, and η=1.0. The length of recommendation list is L=10.
Algorithm
F
1
HD
Novelty
Coverage
UCF
0.0732
0.8876
453.55
0.2720
UOS
0.0733
0.7638
546.90
0.1666
NBI
0.07524
0.5908
677.00
0.0942
SNBI
0.0794
0.6057
657.37
0.1441
IPF
0.0783
0.6607
636.08
0.2084
STeuP
0.095
0.6169
589.88
0.2358Table 6
Comparison of different recommendation models on MovieTweetings data set. For UOS,λ=-0.2; for SNBI, λ=-0.9; for MS-IPF, β=0.1, ρ=1.5, and η=1.0; for STeuP, β=1.0, λ=0.09, μ=0.02, and η=100. The length of recommendation list is L=10.
Algorithm
F
1
HD
Novelty
Coverage
UCF
0.0633
0.7966
335.17
0.1185
UOS
0.0490
0.7785
337.87
0.1837
NBI
0.0706
0.4881
468.30
0.0440
SNBI
0.0725
0.4999
463.43
0.0542
IPF
0.0785
0.5024
462.35
0.0447
STeuP
0.0865
0.5269
394.51
0.1341


## 5. Conclusions

In this paper, we analyzed users’ dynamic rating criterions and we discovered the different temporal effects of user’s positive and negative opinions on future preference. We propose a session-based movie recommendation model using this dynamic rating information, which simultaneously considers the temporal change of users’ rating criterions and different temporal effects of positive and negative ratings. The extensive experiments on three real-world movie data sets show that the accuracy of our proposed model is significantly improved compared to the state-of-the-art methods.



---

*Source: 8940709-2017-03-12.xml*