A New Collaborative Filtering Algorithm Integrating Time and Multisimilarity
Algorithm 1
Collaborative filtering recommendation algorithm integrating time and multisimilarity.
Input: User item scoring matrix R, target user V, number of neighbor users K, number of recommended items n
Output: N items recommended to target user V
(1)
Import user item scoring matrix data
(2)
For the common attention matrix, the attention similarity between users is calculated by Formula (5)
(3)
For user attributes, use Fformulas (6) and (7) to calculate the similarity between user attributes
(4)
Through the common scoring items, the similarity of user attention is calculated by Formula (8)
(5)
The attention similarity calculated in step 2 (the weight is α), the attribute similarity calculated in step 3 (the weight is 1 − α), the weight fusion method is used to weight the score similarity to obtain the user multisimilarity
(6)
According to the calculation result in step 5, extract K users’ favorite m items (m > n, excluding the items already liked by the target user)
(7)
According to the popularity, use Formula (10) to calculate the weight W of the improved project popularity
(8)
M candidate items are multiplied by the weight W, and N recommended items are selected from high to low