# The Collaborative Filtering Method Based on Social Information Fusion

Authors: Hao Wang; Yadi Song; Peng Mi; Jianyong Duan
Journal: Mathematical Problems in Engineering
 (2019)

---

## Abstract

In the social network, similar users are assumed to prefer similar items, so searching the similar users of a target user plays an important role for most collaborative filtering methods. Existing collaborative filtering methods use user ratings of items to search for similar users. Nowadays, abundant social information is produced by the Internet, such as user profiles, social relationships, behaviors, interests, and so on. Only using user ratings of items is not sufficient to recommend wanted items and search for similar users. In this paper, we propose a new collaborative filtering method using social information fusion. Our method first uses social information fusion to search for similar users and then updates the user rating of items for recommendation using similar users. Experiments show that our method outperforms the existing methods based on user ratings of items and using social information fusion to search similar users is an available way for collaborative filtering methods of recommender systems.


---

## Body

## 1. Introduction

Importing social information to the collaborative filtering method is proved to be an available way to improve the performance of the recommender system and alleviate the data sparseness problem caused by the cold start [1–3]. Take, for examples, in microblog, the Chinese twitter, most existing collaborative filtering methods use user ratings of items (microblogs) to search for similar users. When the number of microblogs is much more than the number of microblogs which have been rated, the data sparseness problem will be caused. This problem makes searching similar users only relied on microblogs (items) inconvenient.In order to address the above issues, we propose a new collaborative filtering method which uses social information fusion to search the similar users and then update user ratings of items using the similar users, which will alleviate the problem of data sparsity. Finally, we recommend the items based on the updated user ratings of items.The remainder of this paper is organized as follows. In Section2, we discuss the related work. Then we formulate the social information fusion in Section 3. The process of recommendation is given in Section 4. Finally, we show our experimental results in Section 5 and draw a conclusion in Section 6.


## 2. Related Work

The user-based collaborative filtering recommendation algorithm assumes the interest between similar users (neighbors) is similar [4]. First, find the neighbor user of the target user, and then predict the target user’s rating of the corresponding item according to the rating of the similar user, thereby completing the recommendation. To find neighbor users, the traditional method is to treat the user’s rating of the item as a high-dimensional vector and use cosine similarity to find the user with high similarity as the target user’s neighbor. This method can effectively use the feedback information of other users. However, in the actual environment, the number of items is far greater than the number of users, and the number of items that users can browse is limited, which results in the sparseness of the user-item rating matrix, which makes it difficult to find similar users. In the case of sparse data, a small number of user ratings is not enough to support larger items recommendation.To alleviate this problem, literature [5] proposes a simple recommendation algorithm that fully exploits the similarity information among users and items and intrinsic structural information of the user-item matrix. This method constructs a new representation which preserves affinity and structure information in the user-item rating matrix and then performs recommendation task. Experimental results show the effectiveness of this method. Recently, a linear sparse and low-rank representation of the user-item matrix has been applied to produce Top-N recommendations. Literature [6] addresses the limitations of the nuclear norm by mimicking the behavior of the true rank function and improves the quality of recommendation substantially. Literature [7] proposes a method to reduce the item’s space dimension based on singular value decomposition (SVD), but the reduction of dimension led to the loss of information at the same time, which makes the effect difficult to guarantee. Many scholars have begun to study the similarity between users from user attribute and social attribute. Literature [8] adopts the thought of deep search to find the trust relationship among users and then to regard people with the strong relationship of trust as similar users. Literature [9] presents Matchmaker, a collaborative filtering friend recommendation system based on personality matching, and gets a good result. Literature [10] studies the problem of link recommendation in weblogs and similar social networks and proposes an approach based on collaborative recommendation using the link structure of a social network and content-based recommendation using mutual declared interests. Literature [11] utilizes the user’s interaction relationship to measure the user relationship strength. Literature [12] fuses the user’s similarity of attributes and the user’s interaction relationship for user similarity calculation. In addition, the analysis of user relationship is also often used for friends' recommendation [13].Our study finds that every piece of social information reflects an aspect of the user. This paper proposes a novel method based on social information fusion instead of the method based on user ratings of items to search neighbors.


## 3. Fusion of Social Information

Based on the experimental data provided by KDD CUP 2012 track1, this paper divides a user’s social information into personal description information (Profile), relationship information (Follow), behavior information (Action), and interest information (Interest). Therefore, the social information fusion is expressed as(1)UserInformationu=Profileu,Followu,Actionu,InterestuThe similarity between the users is expressed as(2)simu1,u2=k1simProfileu1,u2+k2simFollowu1,u2+k3simActionu1,u2+k4simInterestu1,u2,k1+k2+k3+k4=1The description of each piece of information and its similarity calculation are as follows.


### 3.1. Similarity of Personal Description Information

Personal description information includes gender (sex), age (age), and label (tag). The similarity of personal description information is defined as(3)simProfileu1,u2=k1simSexu1,u2+k2simAgeu1,u2+k3simTagu1,u2,k1+k2+k3=1(1) s i m S e x ( u 1 , u 2 ). Gender is represented by numbers. Number 1 means male, Number 2 means female, and Number 0 means unknown. The similarity of gender is defined as follows:(4)simSexu1,u2=1u1.Sex!=0&&u2.Sex!=0&&u1.Sex==u2.Sex0u1.Sex==0u2.Sex==0u1.Sex!=u2.Sex(2) s i m A g e ( u 1 , u 2 ). Age is expressed in year of birth. First, we transfer the user’s birth year into an actual age. Second, consider that people’s cognitive ability is changing along with age. For the older, the cognitive ability difference is bigger. For two people of younger and two people of older, even if these two groups have the same age difference, the cognitive ability difference between younger group will be smaller than that in older group in most situations. The similarity of age is defined as follows:(5)simAgeu1,u2=121-u1.Age-u2.Ageu1.Age+1-u1.Age-u2.Ageu2.Age(3) s i m T a g ( u 1 , u 2 ). Tag is expressed in words. Due to the fact that different users have various tags, we use the proportion of the number of the two users’ common tags and total tags as evaluation. The formula is as follows:(6)simTagu1,u2=u1.Tag∩u2.Tagu1.Tag+u2.Tag-u1.Tag∩u2.Tag


### 3.2. Similarity of Relationship Information

Relationship information contains the focusing information (followee) and fans information (followers). Relationship information similarity is expressed as formula (7), and k1+k2=1. (7)simFolloweru1,u2=k1∗simFolloweru1,u2+k2∗simFolloweru1,u2Focusing information and fans information are mutual; for example, useru1 focuses on the user u2, the user u2 is the user u1’s focusing information, and user u1 is u2’s fans information at the same time. So, the calculation of focusing information and fans information is the same. Due to a large number of users in the data, high-dimensional cosine similarity calculation should be avoided, so we use the proportion of the two users’ focusing/fans information and of their total as evaluation. The formula is as follows:(8)simFolloweeu1,u2=u1.Followee∩u2.Followeeu1.Followee+u2.Followee-u1.Followee∩u2.Followee


### 3.3. Similarity of Behavior Information

Behavior information includes comment number (Comment), pointing frequency (At), and forwarding frequency (Retweet). Similarity of behavior information is expressed as follows, andk1+k2+k3=1:(9)simActionu1,u2=k1simCommentu1,u2+k2simAtu1,u2+k3simRetweetu1,u2The above three types of data have the same forms, which led to the same evaluation methods. Taking comment number information, for example, creates a comment matrix based on the number of users. In comment matrix, each row stands for a user’s number of comment given to other users, and each column stands for the number of comments of a user received. Useru1’s comments for other users are recorded vector Comment→u1. The similarity of two users is calculated using cosine similarity; the formula is as follows:(10)simCommentu1,u2=Commentu1→·Commentu2→Commentu1→∗Commentu2→


### 3.4. Similarity of Interest Information

Experimental data provide the keywords and the corresponding weights of keywords, both extracted from user’s microblog comments, and classify all the keywords. According to this information, we could calculate the similarity of the user’s interest information.As is shown in Figure1, keywords are included in one or more categories. After counting, the weight of every keyword could be reflected in the classification. Establish the interest classification matrix based on the number of classifications, and then every user could get a corresponding interest classification vector through calculating. The similarity of interest would be calculated using cosine similarity.Figure 1
The relationship of user’s interest.The calculation process is as follows.Step 1.
Set keywords set asC=c1,…,cn; set user-keywords weight as UC=weightc1,…,weightcn; set classified collection as V=v1,…,vm. All data in above can be provided directly by the experimental data.Step 2.
Set the user-classification weight which we are going to calculate asUV=weightv1,…,weightvm; the calculation formula of weights is weightvi = 1/vi∑cj∈vi(weightcj(weightcj/∑ck∈viweightck)). In this formula, vi means the keywords’ number included in the classification of vi.Step 3.
RegardUV=weightv1,…,weightvm as Interest→=(weightv1,…,weightvm).
Then, the similarity calculation of interest information between two users is as follows:(11)simInterestu1,u2=Interestu1→·Interestu2→Interestu1→∗Interestu2→


## 3.1. Similarity of Personal Description Information

Personal description information includes gender (sex), age (age), and label (tag). The similarity of personal description information is defined as(3)simProfileu1,u2=k1simSexu1,u2+k2simAgeu1,u2+k3simTagu1,u2,k1+k2+k3=1(1) s i m S e x ( u 1 , u 2 ). Gender is represented by numbers. Number 1 means male, Number 2 means female, and Number 0 means unknown. The similarity of gender is defined as follows:(4)simSexu1,u2=1u1.Sex!=0&&u2.Sex!=0&&u1.Sex==u2.Sex0u1.Sex==0u2.Sex==0u1.Sex!=u2.Sex(2) s i m A g e ( u 1 , u 2 ). Age is expressed in year of birth. First, we transfer the user’s birth year into an actual age. Second, consider that people’s cognitive ability is changing along with age. For the older, the cognitive ability difference is bigger. For two people of younger and two people of older, even if these two groups have the same age difference, the cognitive ability difference between younger group will be smaller than that in older group in most situations. The similarity of age is defined as follows:(5)simAgeu1,u2=121-u1.Age-u2.Ageu1.Age+1-u1.Age-u2.Ageu2.Age(3) s i m T a g ( u 1 , u 2 ). Tag is expressed in words. Due to the fact that different users have various tags, we use the proportion of the number of the two users’ common tags and total tags as evaluation. The formula is as follows:(6)simTagu1,u2=u1.Tag∩u2.Tagu1.Tag+u2.Tag-u1.Tag∩u2.Tag


## 3.2. Similarity of Relationship Information

Relationship information contains the focusing information (followee) and fans information (followers). Relationship information similarity is expressed as formula (7), and k1+k2=1. (7)simFolloweru1,u2=k1∗simFolloweru1,u2+k2∗simFolloweru1,u2Focusing information and fans information are mutual; for example, useru1 focuses on the user u2, the user u2 is the user u1’s focusing information, and user u1 is u2’s fans information at the same time. So, the calculation of focusing information and fans information is the same. Due to a large number of users in the data, high-dimensional cosine similarity calculation should be avoided, so we use the proportion of the two users’ focusing/fans information and of their total as evaluation. The formula is as follows:(8)simFolloweeu1,u2=u1.Followee∩u2.Followeeu1.Followee+u2.Followee-u1.Followee∩u2.Followee


## 3.3. Similarity of Behavior Information

Behavior information includes comment number (Comment), pointing frequency (At), and forwarding frequency (Retweet). Similarity of behavior information is expressed as follows, andk1+k2+k3=1:(9)simActionu1,u2=k1simCommentu1,u2+k2simAtu1,u2+k3simRetweetu1,u2The above three types of data have the same forms, which led to the same evaluation methods. Taking comment number information, for example, creates a comment matrix based on the number of users. In comment matrix, each row stands for a user’s number of comment given to other users, and each column stands for the number of comments of a user received. Useru1’s comments for other users are recorded vector Comment→u1. The similarity of two users is calculated using cosine similarity; the formula is as follows:(10)simCommentu1,u2=Commentu1→·Commentu2→Commentu1→∗Commentu2→


## 3.4. Similarity of Interest Information

Experimental data provide the keywords and the corresponding weights of keywords, both extracted from user’s microblog comments, and classify all the keywords. According to this information, we could calculate the similarity of the user’s interest information.As is shown in Figure1, keywords are included in one or more categories. After counting, the weight of every keyword could be reflected in the classification. Establish the interest classification matrix based on the number of classifications, and then every user could get a corresponding interest classification vector through calculating. The similarity of interest would be calculated using cosine similarity.Figure 1
The relationship of user’s interest.The calculation process is as follows.Step 1.
Set keywords set asC=c1,…,cn; set user-keywords weight as UC=weightc1,…,weightcn; set classified collection as V=v1,…,vm. All data in above can be provided directly by the experimental data.Step 2.
Set the user-classification weight which we are going to calculate asUV=weightv1,…,weightvm; the calculation formula of weights is weightvi = 1/vi∑cj∈vi(weightcj(weightcj/∑ck∈viweightck)). In this formula, vi means the keywords’ number included in the classification of vi.Step 3.
RegardUV=weightv1,…,weightvm as Interest→=(weightv1,…,weightvm).
Then, the similarity calculation of interest information between two users is as follows:(11)simInterestu1,u2=Interestu1→·Interestu2→Interestu1→∗Interestu2→


## 4. The Process of Recommendation

User-based collaborative filtering recommendation creates a rating matrix based on user ratings of items and predicts the possible rating of the target user in the unrated item according to the rating matrix. The recommendation sequence is then generated based on the predicted rating. The sparseness of the rating matrix in the actual data is one of the key factors affecting the accuracy of the entire recommendation. The matrix filling technique [14] provides an idea in solving the matrix sparsity problem. For user’s unrated content, early scholars set it to the average of other users’ ratings of items [15], which did not fundamentally alleviate the sparseness of the rating matrix.


### 4.1. The Introduction

Based on the experimental data, the data provides a representation of whether the user likes the target item, each of which contains several keyword attributes. In the data, “1” means like, and “-1” means dislike. We use “1” or “-1” as the user’s rating for the item and for the unrated item as “0”.As is shown in Figure2, user u likes Items 1 and 2; user v likes Item 3. The initial rating is shown in Table 1.Table 1
The initial rating of the item.
Item 1 Item 2 Item 3 Item 4 Item 5 Useru 1 1 0 0 0 Userv 0 0 1 0 0Figure 2
User ratings of items.The data is sparse in the matrix, at the same time there are no common rating items between the two users. But there is a connection between the item they like. Taking Item 1 as an example, we divide the useru’s ratings for Item 1 into three equal parts according to the number of keywords included in Item 1 and think that word A, word B, and word D occupy 1/3 of the rating respectively. Excluding the relationship between Item 1 and word D, word D has a relationship with Item 3 and Item 4. At this time, the 1/3 rating of Item 1 occupied by the word D is equally divided into two and is reflected to the keyword D of Item 3 and Item 4; that is, the keyword D of the Item 3 and Item 4, respectively, occupies the 1/6 rating. Then process other items in this way. The processed ratings of the items are shown in Table 2.Table 2
The processed rating of the item.
Item 1 Item 2 Item 3 Item 4 Item 5 Useru 3/2 4/3 1/6 1/6 1/2 Userv 1/4 0 1 1/4 1/2This matrix filling process can pass the rating through the implicit relationship between the items to other related items, showing an implicit rating. At the same time, since some ratings of items are the same (1 or -1), personal preferences cannot be highlighted. Through this process, they can be distinguished.


### 4.2. The Process

Regard the sets of items asItems=item1,…,itemn; regard the sets of words as Words=word1,…,wordm.Create an array,SumEvaluation[n], to save the reflection rating.Step 1.
Selectitemi from items; the rating of itemi is 1; extract ItemWords=itemword1,…,itemwordk from the set words; and in the formula, wordj∈itemi.Step 2.
Selectwordj from Words; find TagetItems=tagetitem1,…,tagetitemx out; in the formula, itemwordj∈tagetitemz and itemi∉Tagetitems.Step 3.
IfTagetItems is not empty, add the implicit rating 1/TagetItems.Count to SumEvaluation[n] corresponding to each element in TagetItems.Step 4.
If there is any comment inItemWords, continue from Step 2.Step 5.
If there is any comment inItems, continue from Step 1.Step 6.
Add original ratings toSumEvaluation[n].Finally, represent the values inSumEvaluation[n] as user ratings of items. Put the new SumEvaluation[n] together; then we get the new rating matrix.


### 4.3. The Recommendation

According to the methods in Section3, we get the neighboring user sets U. Next, process every user’s rating by the calculation method above, then we get the new ratings. Therefore, the formula for user u’s prediction rating Pu,itemi of itemi is as follows:(12)Pu,itemi=Ru¯+∑v∈Usimu,v∗Rv,itemi-Rv¯∑v∈Usimu,vRu¯ presents the user u’s average rating of items, Rv,itemi presents user v’s rating for itemi, and sim(u,v) presents the similarity between user u and v. Finally, the first few items with high ratings in the predicted ratings are used as the recommended set.


## 4.1. The Introduction

Based on the experimental data, the data provides a representation of whether the user likes the target item, each of which contains several keyword attributes. In the data, “1” means like, and “-1” means dislike. We use “1” or “-1” as the user’s rating for the item and for the unrated item as “0”.As is shown in Figure2, user u likes Items 1 and 2; user v likes Item 3. The initial rating is shown in Table 1.Table 1
The initial rating of the item.
Item 1 Item 2 Item 3 Item 4 Item 5 Useru 1 1 0 0 0 Userv 0 0 1 0 0Figure 2
User ratings of items.The data is sparse in the matrix, at the same time there are no common rating items between the two users. But there is a connection between the item they like. Taking Item 1 as an example, we divide the useru’s ratings for Item 1 into three equal parts according to the number of keywords included in Item 1 and think that word A, word B, and word D occupy 1/3 of the rating respectively. Excluding the relationship between Item 1 and word D, word D has a relationship with Item 3 and Item 4. At this time, the 1/3 rating of Item 1 occupied by the word D is equally divided into two and is reflected to the keyword D of Item 3 and Item 4; that is, the keyword D of the Item 3 and Item 4, respectively, occupies the 1/6 rating. Then process other items in this way. The processed ratings of the items are shown in Table 2.Table 2
The processed rating of the item.
Item 1 Item 2 Item 3 Item 4 Item 5 Useru 3/2 4/3 1/6 1/6 1/2 Userv 1/4 0 1 1/4 1/2This matrix filling process can pass the rating through the implicit relationship between the items to other related items, showing an implicit rating. At the same time, since some ratings of items are the same (1 or -1), personal preferences cannot be highlighted. Through this process, they can be distinguished.


## 4.2. The Process

Regard the sets of items asItems=item1,…,itemn; regard the sets of words as Words=word1,…,wordm.Create an array,SumEvaluation[n], to save the reflection rating.Step 1.
Selectitemi from items; the rating of itemi is 1; extract ItemWords=itemword1,…,itemwordk from the set words; and in the formula, wordj∈itemi.Step 2.
Selectwordj from Words; find TagetItems=tagetitem1,…,tagetitemx out; in the formula, itemwordj∈tagetitemz and itemi∉Tagetitems.Step 3.
IfTagetItems is not empty, add the implicit rating 1/TagetItems.Count to SumEvaluation[n] corresponding to each element in TagetItems.Step 4.
If there is any comment inItemWords, continue from Step 2.Step 5.
If there is any comment inItems, continue from Step 1.Step 6.
Add original ratings toSumEvaluation[n].Finally, represent the values inSumEvaluation[n] as user ratings of items. Put the new SumEvaluation[n] together; then we get the new rating matrix.


## 4.3. The Recommendation

According to the methods in Section3, we get the neighboring user sets U. Next, process every user’s rating by the calculation method above, then we get the new ratings. Therefore, the formula for user u’s prediction rating Pu,itemi of itemi is as follows:(12)Pu,itemi=Ru¯+∑v∈Usimu,v∗Rv,itemi-Rv¯∑v∈Usimu,vRu¯ presents the user u’s average rating of items, Rv,itemi presents user v’s rating for itemi, and sim(u,v) presents the similarity between user u and v. Finally, the first few items with high ratings in the predicted ratings are used as the recommended set.


## 5. Experiments

This section compares the ideas presented in this paper through two sets of experiments. The experimental content includes(1)
the user’s relationship information’s effect to similar users;(2)
the collaborative filtering method based on matrix filling algorithm.


### 5.1. The Experimental Data

The experimental data in this paper is derived from the data provided in the KDD CUP 2012 track1. The data is based on Tencent Weibo for a period of time, extracting all kinds of social information of users. These include user information (gender, age, number of microblogs, and tags), relationship information, behavior information (forwarding information, pointing information-@, and rating information), keyword information (keywords, weights, and classifications), and items accepted and rejected by users and their ratings. Since the data-related content is encrypted, it is inconvenient for data screening. We screened the data as follows.Step 1.
Randomly select 20 users whose age information is between 15 and 40 years from all users and put them in the queue.Step 2.
Dequeue a user from the queue, use the user as an experimental user, and put the friends he follows into the queue.Step 3.
Repeat the second step, when the number of experimental user groups reaches the target number.After the progress in above is completed, we get 10001 experimental users. The related information includes 846077 pieces of item rating information, 821666 pieces of relationship information, 381208 pieces of behavior information, 16267430 pieces of keywords information, and 363 keywords’ classification information.


### 5.2. The Influence of the User’s Social Information to Similar Users

First, we divide the 10001 users into groups, each group consisting of two users, and then we get 50005000 similarity computing groups. For each group of users, according to the calculation process described in this paper, age similarity, gender similarity, label similarity, following similarity, fan similarity, forwarding similarity, pointing similarity, comment similarity, rating similarity, and interest similarity are calculated, respectively, as shown in Figures3–6.Figure 3
The comparison of age, gender, and label similarity.Figure 4
The comparison of fans and following similarity.Figure 5
The comparison of comment, pointing, and forwarding similarity.Figure 6
The comparison of rating and interest similarity.As can be seen from the data in Figure3, the ratio of male to female in the experimental data is close to 1:1, and the age difference is moderate, but the label has a large difference. From the data in Figure 4, the fan information is more difficult to reflect the similarity between users than the information of interest. As is shown in Figure 5, the similarity of forwarding behavior in user behavior accounts for a large proportion. As is shown in Figure 6, the rating information can also be regarded as a kind of user interest, but compared with the keywords extracted in the experimental data and the interest extracted from the classification, it does not reflect the similarity of interest between users. This is due to the large number of microblogs, and the related microblog content cannot be browsed by the user, resulting in the inability to obtain the rating. Therefore, analyzing user interests according to their keywords and their related classifications in a user’s limited page views can alleviate such problems.According to the similarity information calculated above, we use the personal description information, relationship information, behavior information, and interest information to perform the selection calculation of similar users and then find the fusion parameters in each piece of information. The evaluation criteria of similar users are based on the user’s own followers. The description is as follows: select one useru from the experimental users and calculate the similarity for the other users. The descending sequence of similarity values is taken as the user u’s similar user sequence. Use the user u’s own followers as the correct collection. The similar user sequence is valued from 5 to 40 according to Top-N, and combined with the user set, the map (Mean Average Precision) calculation is performed [16], and the formula is as follows:(13)MAP@N=1U∑u∈U1Fu,N∑i=1Fu,NiSu,N_rankiIn this formula,U represents the number of experimental user sets; F(u,N) represents the number of elements included in the correct recommendation set of user u when the recommendation number is N. S(u,N) represents the first N similar user sets. S(u,N)_rank(i) represents the ranking of the i-th correct content in the similar user sets.Taking behavior information as an example, according to the fusion calculation methods,simAction(u1,u2) described in this paper that the coefficients of the three kinds of data included in the behavior information are valued in the range of 0.1 to 0.8, ensuring that each coefficient is greater than 0 and the sum of the three coefficients is 1. When Top-N takes 40, the average map value image of all experimental users is shown in Figure 7.Figure 7
The MAP results’ transformation of behavior information.The horizontal axis represents the coefficient. From top to bottom, they are the coefficient of point information, forwarding information, and comment information. As shown in the graph, finding similar users based on behavior information is mainly affected by the similarity of the forwarding information. Each peak is generated when the forwarding information coefficient has a larger value, and each trough is generated when the forwarding information coefficient is the smallest.We will get the maximum value of the map when the value on X-axis is “253”. So the formula of convergence computation is expressed as(14)simActionu1,u2=0.3∗simCommonu1,u2+0.2∗simAtu1,u2+0.5∗simRetweetu1,u2In the same way, we give the weight of personal description information and relationship information, as shown in Table3.Table 3
The coefficients.
The formulas Parameter The fusion formula of personal description information the coefficient of label information: 0.5; the coefficient of age information: 0.25; the coefficient of gender information: 0.25  The fusion formula of relationship information the coefficient of following information: 0.5; the coefficient of fans information: 0.5  The fusion formula of behavior information the coefficient of comments information: 0.3; the coefficient of pointing information: 0.2; the coefficient of forwarding information: 0.5Next, we conduct experiments to find similar users according to the combined personal description information, relationship information, behavior information, and interest information and rating information. In the experiment, the Top-N values were taken from 5 to 40, and the average map value of the experimental users is shown in Figure8.Figure 8
The MAP results of each attribute.As can be seen from the figure, with the growth of Top-N, it is better to calculate similar users according to social information than other methods. However, the map value calculated based on the rating information is low, and it is not suitable to find similar users based only on the content. The behavior information is better when the value of Top-N is lower.The experimental data can show that, due to the sparse user ratings, implicit ratings are not enough to give reasonable similar users. Similar users based on relationship information and behavior information are better than rating information. According to the idea of fusion and through a large amount of data calculation, a similar user calculation formulasim(u1,u2) is obtained, in which the coefficient of behavior information, relationship information, interest information coefficient, and personal description information are 0.36, 0.49, 0.11, and 0.44, respectively. Then compare with the traditional method of finding neighbor users according to the rating. The comparison result is shown in Figure 9, where Top-N ranges from 5 to 40.Figure 9
The comparison of final experiment result.


### 5.3. The Collaborative Filtering Recommendation Experiment Based on the User Similarity Degree

The experimental data provided a record of 845,727 use ratings of items involving 3,775 related items. According to the method of finding neighbor users in Section5.2, we selected 40 neighboring users for every user, and each user with the corresponding neighboring users comprised the evaluation matrix of the item. According to the method of processing matrix sparsity in Section 4, we process the rating matrix. The result is shown in Table 4.Table 4
The proportion of rating matrix sparsity.
The proportion of nonzero Before processed After processed The original rating matrix 0.044 0.397 The positive ratings 0.018 0.174 rating matrixAccording to the processed rating matrix, we repredict the current user’s ratings of the item according to the formula in Section4.3. We use the recall rate (R) and precision (P) and F1 as the basis for evaluation. The recall rate is the ratio of the correct recommendation quantity to the theoretical maximum recommendation item quantity; the precision rate is the ratio of the correct recommendation quantity to the recommendation total number; the F1 calculation can be balanced between the recall rate and the precision rate. The formulas are as follows:(15)R=hitstestsetP=hitsrecsetF1=2∗P∗RP+Rh i t s indicates the number of items whose original rating of the user is “1” in the recommendation set. testset indicates the number of all users whose original rating is “1”. recset indicates the number of items in the recommendation set. Then we sort the user’s predicted rating results and select the recommendation set according to the Top-k. Three cases were selected for comparison in the experiment.(1) Recommending directly without matrix sparsity processing.(2) Recommending after matrix sparsity processing.(3) Only considering the positive evaluation of the user, getting the rating matrix, and then performing the recommendation after matrix sparsity processing. Figure10 shows the variation of the F1 value between 5 and 45 for the Top-k value.Figure 10
The experimental results of item recommendation.According to the experimental results, we can get the following:(1) The recommendation effect after sparse processing of the rating matrix is better than the recommendation effect of not processing the rating matrix. When the value of Top-k is 5, the two are basically the same. As the Top-k grows, the difference is obvious. When the value of Top-k is between 30 and 45, the difference between the two is relatively obvious. According to the result, when the matrix sparsity processing is not performed, the item with more original rating of “1” cannot be selected as the recommendation result.(2) Negative ratings have a certain influence on the recommendation effect. The rating includes a positive rating with a value greater than zero and a negative rating with a value less than zero, with a value of zero indicating that the user has not rated. In the data, we found that the ratio of the negative rating is more important than the positive rating. After the rating vector processing, the values of more ratings are expressed as negative numbers. In order to reflect the impact of negative ratings, we removed the negative ratings, only considering the impact of positive ratings and conducting recommendation experiments. As can be seen from Figure9, the experimental results considering both positive and negative ratings are better than those considering only negative ratings.


## 5.1. The Experimental Data

The experimental data in this paper is derived from the data provided in the KDD CUP 2012 track1. The data is based on Tencent Weibo for a period of time, extracting all kinds of social information of users. These include user information (gender, age, number of microblogs, and tags), relationship information, behavior information (forwarding information, pointing information-@, and rating information), keyword information (keywords, weights, and classifications), and items accepted and rejected by users and their ratings. Since the data-related content is encrypted, it is inconvenient for data screening. We screened the data as follows.Step 1.
Randomly select 20 users whose age information is between 15 and 40 years from all users and put them in the queue.Step 2.
Dequeue a user from the queue, use the user as an experimental user, and put the friends he follows into the queue.Step 3.
Repeat the second step, when the number of experimental user groups reaches the target number.After the progress in above is completed, we get 10001 experimental users. The related information includes 846077 pieces of item rating information, 821666 pieces of relationship information, 381208 pieces of behavior information, 16267430 pieces of keywords information, and 363 keywords’ classification information.


## 5.2. The Influence of the User’s Social Information to Similar Users

First, we divide the 10001 users into groups, each group consisting of two users, and then we get 50005000 similarity computing groups. For each group of users, according to the calculation process described in this paper, age similarity, gender similarity, label similarity, following similarity, fan similarity, forwarding similarity, pointing similarity, comment similarity, rating similarity, and interest similarity are calculated, respectively, as shown in Figures3–6.Figure 3
The comparison of age, gender, and label similarity.Figure 4
The comparison of fans and following similarity.Figure 5
The comparison of comment, pointing, and forwarding similarity.Figure 6
The comparison of rating and interest similarity.As can be seen from the data in Figure3, the ratio of male to female in the experimental data is close to 1:1, and the age difference is moderate, but the label has a large difference. From the data in Figure 4, the fan information is more difficult to reflect the similarity between users than the information of interest. As is shown in Figure 5, the similarity of forwarding behavior in user behavior accounts for a large proportion. As is shown in Figure 6, the rating information can also be regarded as a kind of user interest, but compared with the keywords extracted in the experimental data and the interest extracted from the classification, it does not reflect the similarity of interest between users. This is due to the large number of microblogs, and the related microblog content cannot be browsed by the user, resulting in the inability to obtain the rating. Therefore, analyzing user interests according to their keywords and their related classifications in a user’s limited page views can alleviate such problems.According to the similarity information calculated above, we use the personal description information, relationship information, behavior information, and interest information to perform the selection calculation of similar users and then find the fusion parameters in each piece of information. The evaluation criteria of similar users are based on the user’s own followers. The description is as follows: select one useru from the experimental users and calculate the similarity for the other users. The descending sequence of similarity values is taken as the user u’s similar user sequence. Use the user u’s own followers as the correct collection. The similar user sequence is valued from 5 to 40 according to Top-N, and combined with the user set, the map (Mean Average Precision) calculation is performed [16], and the formula is as follows:(13)MAP@N=1U∑u∈U1Fu,N∑i=1Fu,NiSu,N_rankiIn this formula,U represents the number of experimental user sets; F(u,N) represents the number of elements included in the correct recommendation set of user u when the recommendation number is N. S(u,N) represents the first N similar user sets. S(u,N)_rank(i) represents the ranking of the i-th correct content in the similar user sets.Taking behavior information as an example, according to the fusion calculation methods,simAction(u1,u2) described in this paper that the coefficients of the three kinds of data included in the behavior information are valued in the range of 0.1 to 0.8, ensuring that each coefficient is greater than 0 and the sum of the three coefficients is 1. When Top-N takes 40, the average map value image of all experimental users is shown in Figure 7.Figure 7
The MAP results’ transformation of behavior information.The horizontal axis represents the coefficient. From top to bottom, they are the coefficient of point information, forwarding information, and comment information. As shown in the graph, finding similar users based on behavior information is mainly affected by the similarity of the forwarding information. Each peak is generated when the forwarding information coefficient has a larger value, and each trough is generated when the forwarding information coefficient is the smallest.We will get the maximum value of the map when the value on X-axis is “253”. So the formula of convergence computation is expressed as(14)simActionu1,u2=0.3∗simCommonu1,u2+0.2∗simAtu1,u2+0.5∗simRetweetu1,u2In the same way, we give the weight of personal description information and relationship information, as shown in Table3.Table 3
The coefficients.
The formulas Parameter The fusion formula of personal description information the coefficient of label information: 0.5; the coefficient of age information: 0.25; the coefficient of gender information: 0.25  The fusion formula of relationship information the coefficient of following information: 0.5; the coefficient of fans information: 0.5  The fusion formula of behavior information the coefficient of comments information: 0.3; the coefficient of pointing information: 0.2; the coefficient of forwarding information: 0.5Next, we conduct experiments to find similar users according to the combined personal description information, relationship information, behavior information, and interest information and rating information. In the experiment, the Top-N values were taken from 5 to 40, and the average map value of the experimental users is shown in Figure8.Figure 8
The MAP results of each attribute.As can be seen from the figure, with the growth of Top-N, it is better to calculate similar users according to social information than other methods. However, the map value calculated based on the rating information is low, and it is not suitable to find similar users based only on the content. The behavior information is better when the value of Top-N is lower.The experimental data can show that, due to the sparse user ratings, implicit ratings are not enough to give reasonable similar users. Similar users based on relationship information and behavior information are better than rating information. According to the idea of fusion and through a large amount of data calculation, a similar user calculation formulasim(u1,u2) is obtained, in which the coefficient of behavior information, relationship information, interest information coefficient, and personal description information are 0.36, 0.49, 0.11, and 0.44, respectively. Then compare with the traditional method of finding neighbor users according to the rating. The comparison result is shown in Figure 9, where Top-N ranges from 5 to 40.Figure 9
The comparison of final experiment result.


## 5.3. The Collaborative Filtering Recommendation Experiment Based on the User Similarity Degree

The experimental data provided a record of 845,727 use ratings of items involving 3,775 related items. According to the method of finding neighbor users in Section5.2, we selected 40 neighboring users for every user, and each user with the corresponding neighboring users comprised the evaluation matrix of the item. According to the method of processing matrix sparsity in Section 4, we process the rating matrix. The result is shown in Table 4.Table 4
The proportion of rating matrix sparsity.
The proportion of nonzero Before processed After processed The original rating matrix 0.044 0.397 The positive ratings 0.018 0.174 rating matrixAccording to the processed rating matrix, we repredict the current user’s ratings of the item according to the formula in Section4.3. We use the recall rate (R) and precision (P) and F1 as the basis for evaluation. The recall rate is the ratio of the correct recommendation quantity to the theoretical maximum recommendation item quantity; the precision rate is the ratio of the correct recommendation quantity to the recommendation total number; the F1 calculation can be balanced between the recall rate and the precision rate. The formulas are as follows:(15)R=hitstestsetP=hitsrecsetF1=2∗P∗RP+Rh i t s indicates the number of items whose original rating of the user is “1” in the recommendation set. testset indicates the number of all users whose original rating is “1”. recset indicates the number of items in the recommendation set. Then we sort the user’s predicted rating results and select the recommendation set according to the Top-k. Three cases were selected for comparison in the experiment.(1) Recommending directly without matrix sparsity processing.(2) Recommending after matrix sparsity processing.(3) Only considering the positive evaluation of the user, getting the rating matrix, and then performing the recommendation after matrix sparsity processing. Figure10 shows the variation of the F1 value between 5 and 45 for the Top-k value.Figure 10
The experimental results of item recommendation.According to the experimental results, we can get the following:(1) The recommendation effect after sparse processing of the rating matrix is better than the recommendation effect of not processing the rating matrix. When the value of Top-k is 5, the two are basically the same. As the Top-k grows, the difference is obvious. When the value of Top-k is between 30 and 45, the difference between the two is relatively obvious. According to the result, when the matrix sparsity processing is not performed, the item with more original rating of “1” cannot be selected as the recommendation result.(2) Negative ratings have a certain influence on the recommendation effect. The rating includes a positive rating with a value greater than zero and a negative rating with a value less than zero, with a value of zero indicating that the user has not rated. In the data, we found that the ratio of the negative rating is more important than the positive rating. After the rating vector processing, the values of more ratings are expressed as negative numbers. In order to reflect the impact of negative ratings, we removed the negative ratings, only considering the impact of positive ratings and conducting recommendation experiments. As can be seen from Figure9, the experimental results considering both positive and negative ratings are better than those considering only negative ratings.


## 6. Conclusion

In this paper, based on the data set of KDD CUP 2012 track1, we study the users’ social information and propose a new collaborative filtering method based on social information fusion. Experiments show that our new method outperforms the method based on user ratings of items and the social information fusion is an available feature for recommender system. In the future, we will study how to extract more effective social information fusion features using the deep learning method.



---

*Source: 9387989-2019-04-02.xml*