A hybrid recommendation method based on SVD++ and UBCF algorithm

By combining the mixed recommendation method of SVD++ and UBCF algorithm in the recommendation system, the accuracy of the recommendation system in terms of cold start and data sparsity is solved, and a more efficient recommendation effect is achieved.

CN114637925BActive Publication Date: 2025-03-28LIAONING TECHNICAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210287614.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-22
Publication Date
2025-03-28
Estimated Expiration
2042-03-22

AI Technical Summary

Technical Problem

When dealing with cold start problems and data sparsity, the recommendation accuracy rate is low, making it difficult to effectively solve these problems.

Method used

A mixed recommendation method based on SVD++ and UBCF algorithm is proposed. By constructing the initialization method and training method of SVD++ objects, combining Pearson similarity calculation and UBCF algorithm, quadratic prediction calculation is performed to obtain the mixed recommendation results of SVD++ and UBCF.

Benefits of technology

The recommendation accuracy of the recommendation system is improved, and the test error RMSE value is reduced and the recommendation effect is optimized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114637925B_ABST
    Figure CN114637925B_ABST
Patent Text Reader

Abstract

The invention discloses a hybrid recommendation method based on SVD++ and UBCF algorithms, the method comprising the following steps: constructing an initialization method of an SVD++ object, for defining initialization parameters and assigning values; defining a training method of an SVD++ object, for constructing a neural network, iteratively using the SVD++ algorithm to train and output an initial matrix; calling the SVD++ algorithm by a main function; defining a function for generating recommendation results in a program, then defining a function for calculating RMSE, and finally calling the UBCF algorithm in the main function, performing a secondary prediction calculation on a new scoring matrix, and obtaining a hybrid recommendation result of SVD++ and UBCF. The invention defines a function for generating recommendation results in a program, then defining a function for calculating RMSE, and finally calling the UBCF algorithm in the main function, performing a secondary prediction calculation on a new scoring matrix, and obtaining a hybrid recommendation result of SVD++ and UBCF.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of personalized recommendation, and in particular relates to a hybrid recommendation method based on SVD++ and UBCF algorithms. Background Art

[0002] With the overload of network information, recommendation systems are becoming more and more important. Recommendation systems form a binary relationship between information products and users, rely on the detailed relationships currently known and the selection scenarios to develop objects of interest for various users, and then carry out more personalized related recommendation operations. The essence of recommendation systems is information filtering, with three parts: collection, analysis and recommendation.

[0003] In the recommendation system, the singular value decomposition (SVD) algorithm was proposed by Lanczos and is a basic mathematical method in data mining. Many scholars have conducted extensive research and improved the accuracy of recommendations to a certain extent. However, in the processing of initial data, many recommendation algorithm studies have not considered the sparsity of data sufficiently.

[0004] The algorithm of the prior art is mainly divided into three processes.

[0005] (1) The SVD++ algorithm is used to fill the rating matrix to alleviate the sparsity problem of the data and obtain a new rating matrix.

[0006] (2) The Pearson similarity of the new rating matrix is ​​calculated to obtain the user similarity matrix, which is used to build the UBCF recommendation engine.

[0007] (3) Use UBCF to perform secondary prediction calculations on the new rating matrix to obtain the SVD++ and UBCF hybrid recommendation results.

[0008] The disadvantage of the above solution is that it does not provide further solutions to the cold start problem of the recommendation system and data sparsity. Summary of the invention

[0009] Aiming at the problem of low accuracy of recommendation system and collaborative filtering (CF) recommendation engine, the present invention proposes a hybrid recommendation method based on SVD++ and UBCF algorithms, and proposes a hybrid recommendation engine of SVD++ and user collaborative filtering (UBCF) to improve the recommendation accuracy.

[0010] In order to solve the above technical problems, the present invention is implemented by the following technical solutions:

[0011] The hybrid recommendation method based on SVD++ and UBCF algorithm provided by the present invention comprises the following steps:

[0012] S1. Construct the initialization method of the SVD++ object to define the initialization parameters and assign them;

[0013] S2. Define the training method of the SVD++ object, which is used to construct a neural network, and iteratively use the SVD++ algorithm to train and output the initial matrix;

[0014] S3, the main function calls the SVD++ algorithm;

[0015] S4. Define the function for generating recommendation results in the program, then define the function for calculating RMSE, and finally call the UBCF algorithm in the main function to perform secondary prediction calculations on the new rating matrix to obtain the SVD++ and UBCF mixed recommendation results.

[0016] Furthermore, in the step S1, firstly initialize the parameters and determine whether the construction is completed. If not, assign values ​​to the initial matrix, set the parameters, and add the numbers to the dictionary variables; if yes, then end.

[0017] Furthermore, in step S2, the network is first trained and parameters are set, data is output, and the number of training times reaches the preset number. If not, random sorting is performed and values ​​are assigned to variables, and the root mean square error is set to 0; if so, it is determined whether the matrix traversal is completed. If not, parameter values ​​are set, predicted values, root mean square error and other values ​​are calculated, and it is iteratively updated to determine whether the user dictionary traversal is completed. If so, the matrix is ​​returned; if not, the parameters are updated and the root mean square error is output.

[0018] From the above, the hybrid recommendation method based on SVD++ and UBCF algorithm of the present invention has at least the following advantages:

[0019] The present invention first constructs an initialization method for an SVD++ object, and the initialization converts the scoring matrix into a two-dimensional array and stores it in a predefined variable. Then, a training method for the SVD++ object is defined, and the training method uses a gradient descent method to process the scoring matrix, and the number of iterations used in the present invention is the first iteration. Finally, the SVD++ algorithm is called in the main function, and the object of the class is directly defined using the initialization method, and then the initial scoring matrix is ​​processed using the training method to obtain a new filled scoring matrix. The calculation function of the Pearson similarity is defined in the program, and then the Pearson similarity calculation method is called in the main function, and the obtained user similarity matrix is ​​used for the construction of the UBCF recommendation engine. The function for generating the recommendation result is defined in the program, and then the function for calculating the RMSE is defined, and finally the UBCF algorithm is called in the main function, and the new scoring matrix is ​​subjected to secondary prediction calculation to obtain the SVD++ and UBCF mixed recommendation result.

[0020] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the following is a detailed description in combination with the preferred embodiments and the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solution of the embodiment of the present invention, the drawings of the embodiment are briefly introduced below.

[0022] Figure 1 Algorithm flow chart for constructing the initialization method of SVD++ object;

[0023] Figure 2 Algorithm flow chart for defining the training method of SVD++ object;

[0024] Figure 3 This is the algorithm flow chart for the main function calling the SVD++ algorithm;

[0025] Figure 4 Algorithm flow chart for Pearson similarity calculation;

[0026] Figure 5 Algorithm flow chart for generating recommendation result function definition;

[0027] Figure 6 Flowchart of the algorithm defined for calculating the RMSE function;

[0028] Figure 7 The algorithm flow chart for the main function calling the UBCF algorithm;

[0029] Figure 8 A comparison chart of related algorithms. DETAILED DESCRIPTION

[0030] The following is a detailed description of the specific embodiments of the present invention in conjunction with the accompanying drawings, which is a part of this specification and illustrates the principles of the present invention through examples. Other aspects, features and advantages of the present invention will become clear from the detailed description. In the referenced drawings, the same or similar components in different figures are represented by the same reference numerals.

[0031] like Figures 1 to 8 As shown, the hybrid recommendation method based on SVD++ and UBCF algorithms of the present invention implements the SVD++ algorithm to fill the scoring matrix by constructing an initialization method of the SVD++ object, defining a training method of the SVD++ object, and calling the SVD++ algorithm by the main function, including the following steps:

[0032] (1) Construct the initialization method of the SVD++ object to define the initialization parameters and assign them. The algorithm flow chart is as follows: Figure 1 shown.

[0033] (2) Define the training method of the SVD++ object to construct a neural network. Iteratively use the SVD++ algorithm to train and output the initial matrix. The algorithm flow chart is as follows: Figure 2 As shown:

[0034] (3) The main function calls the SVD++ algorithm, which is used to make the main function call the above two algorithms. The algorithm flow chart is as follows: Figure 3 As shown:

[0035] Define the Pearson similarity calculation function in the program, then call the Pearson similarity calculation method in the main function, and use the obtained user similarity matrix to build the UBCF recommendation engine. The Pearson similarity calculation method is used to calculate the Person similarity, laying the foundation for the operation of the UBCF algorithm. The algorithm flow chart is as follows Figure 4 As shown:

[0036] In the program, the function for generating recommendation results is defined, and then the function for calculating RMSE is defined. Finally, the UBCF algorithm is called in the main function, and a secondary prediction calculation is performed on the new rating matrix to obtain the SVD++ and UBCF mixed recommendation results.

[0037] 1. Definition of the recommendation result function, which is used to define the function for generating recommendation results. The algorithm flow chart is as follows Figure 5 As shown:

[0038] 2. Definition of RMSE calculation function, used to define the RMSE calculation function, the algorithm flow chart is as follows Figure 6 As shown:

[0039] 3. The main function calls the UBCF algorithm. The main function calls the UBCF algorithm during operation. The algorithm flow chart is as follows: Figure 7 As shown:

[0040] In order to verify the accuracy of the SVD++ and UBCF hybrid algorithm, the present invention selects two groups of models, SVD++-UBCF and UBCF algorithms, for comparison, where the number of SVD++ iterations is 1, and the relationship between the RMSE value of the test score matrix test set and the number of neighbors N is tested. The results are shown in Figure 8 shown.

[0041] The experimental results show that the hybrid algorithm of SVD++ and UBCF proposed in the present invention generally has a lower test error RMSE value than the original UBCF algorithm. The comparison shows that the hybrid recommendation algorithm of SVD++ and UBCF proposed in the present invention has the best recommendation effect and is a better optimization algorithm.

[0042] The above is only a preferred embodiment of the present invention, which certainly cannot be used to limit the scope of rights of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and changes can be made without departing from the principle of the present invention, and these improvements and changes are also regarded as the protection scope of the present invention.

Claims

1. A hybrid recommendation method based on SVD++ and UBCF algorithm, characterized in that: The following steps are involved: S1. Construct the initialization method of the SVD++ object to define the initialization parameters and assign them; S2. Define the training method of the SVD++ object, which is used to construct a neural network, and iteratively use the SVD++ algorithm to train and output the initial matrix; S3, the main function calls the SVD++ algorithm; S4. Define the function for generating recommendation results in the program, then define the function for calculating RMSE, and finally call the UBCF algorithm in the main function to perform secondary prediction calculation on the new rating matrix to obtain the SVD++ and UBCF mixed recommendation results; In step S2, firstly, the network is trained and parameters are set, data is output, and the number of training times reaches the preset number. If not, random sorting is performed and values ​​are assigned to variables, and the root mean square error is set to 0. If so, it is determined whether the matrix traversal is completed. If not, parameter values ​​are set, predicted values ​​and root mean square error are calculated, and it is iteratively updated to determine whether the user dictionary traversal is completed. If so, the matrix is ​​returned; if not, the parameters are updated and the root mean square error is output.

2. The hybrid recommendation method based on SVD++ and UBCF algorithm according to claim 1, characterized in that: In the step S1, firstly initialize the parameters and determine whether the construction is completed. If not, assign values ​​to the initial matrix, set the parameters, and add the numbers to the dictionary variables. If yes, then end.