A cross recommendation method and system based on local weighted linear regression model
The local weighted linear regression model enhances cross-recommendation systems by optimizing the fit between user behavior and rating data, improving accuracy and recall through augmented vectors and stochastic gradient descent.
Patent Information
- Application Number
- CN201810058410.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-01-22
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2038-01-22
AI Technical Summary
The existing cross-recommendation algorithms face challenges with data sparsity and accuracy issues due to the complex relationship between user behavior data and rating data, which are not adequately addressed by quadratic regression models, leading to under-learning or overfitting problems.
A cross-recommendation method using a local weighted linear regression model that expands item vectors into augmented vectors and employs a stochastic gradient descent algorithm to optimize the model, achieving a full fit between user behavior and rating data.
Improves the accuracy and recall rate of the cross-recommendation system by effectively fitting user behavior and rating data, addressing the limitations of quadratic regression models.
Smart Images

Figure CN110110209B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information processing technology, and in particular to a cross recommendation method and system based on a local weighted linear regression model. Background Art
[0002] With the development of information technology and the Internet, people have gradually entered an era of information overload from an era of information scarcity. In this era, both information consumers and information producers have encountered great challenges: for information consumers, it is very difficult to find information of interest from a large amount of information; for information producers, it is also very difficult to make their own information stand out and attract the attention of the majority of users. Recommendation system is an important tool to solve this contradiction. The task of recommendation system is to connect users and information. On the one hand, it helps users find valuable information for themselves, and on the other hand, it allows information to be displayed to users who are interested in it, thereby achieving a win-win situation for information consumers and information producers. Recommendation algorithms have been increasingly widely studied in recent years, and their applications have also penetrated into all aspects of people's lives. However, an important difficulty currently faced by recommendation algorithms is the problem of data sparsity, that is, the proportion of user rating data in the total rating matrix is very small.
[0003] For this reason, the research on cross-domain recommendation algorithms has emerged in recent years. The cross-recommendation algorithm uses auxiliary object information containing additional user preference data to improve the recommendation effect on the target object, which can effectively alleviate the data sparsity problem on the target object. At present, the cross-recommendation algorithm with better accuracy and recall is the cross-recommendation algorithm based on the quadratic regression model. This method is to fit user behavior data and user rating data by establishing a quadratic regression model. The cross-recommendation system uses the quadratic regression model to predict the user's interests and recommend the prediction result information to the user. However, since the relationship between user behavior data and user rating data is often extremely complex, it is difficult for the quadratic regression model to fully fit it (that is, the data is in an under-learning state), which ultimately affects the accuracy and recall of the cross-recommendation system. Although the establishment of a higher-order (such as cubic and quartic) regression model may fit the data more fully, it is easy to cause overfitting, reducing the accuracy and recall of the cross-recommendation system. Summary of the invention
[0004] The technical problem to be solved by the present invention is to overcome the cross-recommendation algorithm based on the quadratic regression model in the prior art. Since the relationship between user behavior data and user rating data is often extremely complex, it is difficult for the quadratic regression model to fully fit it (that is, the data is in an under-learned state), thereby affecting the accuracy and recall rate of the cross-recommendation system; and although establishing a higher-order (such as cubic or quadratic) regression model may fit the data more fully, it is easy to cause overfitting, which will also affect the accuracy and recall rate of the cross-recommendation system.
[0005] According to the first aspect, an embodiment of the present invention provides a cross-recommendation method based on a local weighted linear regression model, including: obtaining a user's rating record for at least one target item in a target object and an auxiliary rating record for at least one auxiliary item in an auxiliary object related to the target object; establishing an item vector for the target item to be rated based on the rating record and the auxiliary rating record; expanding the item vector for the target item to be rated into an augmented vector, and establishing a local weighted linear regression model based on the augmented vector; solving the local weighted linear regression model using a stochastic gradient descent algorithm to obtain an optimized solution; calculating a predicted score for the target item to be rated in the target object based on the optimized solution; and recommending the target item to be rated whose predicted score meets a preset rating standard to the user.
[0006] In combination with the first aspect, in the first implementation of the first aspect, expanding the to-be-evaluated item vector into an augmented vector includes: adding an intercept term to the to-be-evaluated item vector, expanding the to-be-evaluated item vector into an augmented vector, and the value of the intercept term is 1.
[0007] In combination with the first aspect, in the second implementation of the first aspect, a local weighted linear regression model is established according to the following formula:
[0008]
[0009] Wherein, τ represents the preset width parameter, k represents the subscript set of all the augmented vectors, and x (k) represents the augmented vector corresponding to the kth target item to be evaluated by the user, y (k) represents the user's score corresponding to the kth target item to be rated, θ represents the weight vector of the straight line calculated in the local weighted linear regression model, and f(θ) represents the error function of the local weighted linear regression model (when the parameter is θ).
[0010] In combination with the first aspect, in a third implementation of the first aspect, the use of a stochastic gradient descent algorithm to solve the local weighted linear regression model to obtain an optimized solution includes:
[0011] Step S41: Establish the sample set of the user's scoring training items and set the initial value of θ The initial values of the threshold λ and the deviation value b are λ+1;
[0012] Step S42: Determine whether the deviation value b is greater than the threshold value λ, and execute step S43 when the deviation value b is greater than the threshold value λ; and execute step S44 when the deviation value b is not greater than the threshold value λ;
[0013] Step S43: Calculate f(θ) according to the θ value, f(θ) and each training item in the scoring training item sample set, update θ according to f(θ) to obtain an updated θ value; and calculate the updated f(θ) according to the updated θ value, update the deviation value b to the updated f(θ), and return to step S42;
[0014] Step S44: setting the updated θ value as the optimized solution.
[0015] In combination with the first aspect, in a fourth implementation of the first aspect, the calculating f(θ) according to the θ value, the f(θ) and each training item in the scored training item sample set, and updating θ according to the f(θ) to obtain an updated θ value includes: updating the θ value according to the following formula:
[0016]
[0017] Wherein, τ represents the preset width parameter, i represents the subscript set of all the augmented vectors, and x (i) represents the augmented vector corresponding to the i-th target item to be evaluated by the user, y (i) represents the score of the user for the i-th target item to be rated, and f(θ) represents the error function value of the local weighted linear regression model (when the parameter is θ) on the sample set of rated training items.
[0018] In combination with the first aspect, in a fifth implementation of the first aspect, the prediction score is calculated according to the following formula:
[0019] G=θ T x
[0020] Among them, θ T is the transpose of the optimization solution, and x is the augmented vector of the target item to be evaluated.
[0021] According to the second aspect, an embodiment of the present invention provides a cross-recommendation system based on a local weighted linear regression model, comprising: a rating record acquisition module, used to obtain a user's rating record for at least one target item in a target object and an auxiliary rating record for at least one auxiliary item in an auxiliary object related to the target object; a target vector construction module, used to establish a target vector for a target item to be evaluated based on the rating record and the auxiliary rating record; a local weighted linear regression model construction module, used to expand the target vector for a target item to be evaluated into an augmented vector, and establish a local weighted linear regression model based on the augmented vector; an optimization solution solving module, used to solve the local weighted linear regression model using a stochastic gradient descent algorithm to obtain an optimized solution; a predicted rating calculation module, used to calculate a predicted rating for the target item to be evaluated in the target object based on the optimized solution; and a project recommendation module, used to recommend the target item to be evaluated whose predicted rating meets a preset rating standard to the user.
[0022] In conjunction with the second aspect, in a first implementation of the second aspect, the optimization solution finding module is used to perform the following steps:
[0023] Step S41: Establish the sample set of the user's scoring training items and set the initial value of θ , the initial values of the threshold λ and the deviation value b are λ+1;
[0024] Step S42: Determine whether the deviation value b is greater than the threshold value λ, and execute step S43 when the deviation value b is greater than the threshold value λ; and execute step S44 when the deviation value b is not greater than the threshold value λ;
[0025] Step S43: Calculate f(θ) according to the θ value, f(θ) and each training item in the scoring training item sample set, update θ according to f(θ) to obtain an updated θ value; and calculate the updated f(θ) according to the updated θ value, update the deviation value b to the updated f(θ), and return to step S42;
[0026] Step S44: setting the updated θ value as the optimized solution.
[0027] According to the third aspect, an embodiment of the present invention provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable the computer to execute the cross-recommendation method based on the local weighted linear regression model described in the first aspect or any optional method of the first aspect.
[0028] According to the fourth aspect, an embodiment of the present invention provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer executes the cross-recommendation method based on the local weighted linear regression model described in the first aspect or any optional method of the first aspect.
[0029] The technical solution of the present invention has the following advantages:
[0030] The embodiment of the present invention uses the user's rating records for the target object and the auxiliary object to establish a target item vector for the target item to be rated, and then calculates the predicted rating of the target item to be rated by constructing and solving a local weighted linear regression model, and finally recommends the target item to be rated to the user based on the predicted rating. The construction of the local weighted linear regression model achieves a full fit between the user's behavior data and the rating data, thereby improving the accuracy and recall rate of the cross-recommendation system. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0032] Figure 1 is a flow chart of a cross recommendation method based on a local weighted linear regression model in an embodiment of the present invention;
[0033] Figure 2 Schematic diagram of a rating matrix of users and items on a target object and an auxiliary object in an embodiment of the present invention;
[0034] Figure 3 A flowchart for solving a local weighted linear regression model in an embodiment of the present invention;
[0035] Figure 4 Schematic diagram of the structure of a cross recommendation system based on a local weighted linear regression model in an embodiment of the present invention;
[0036] Figure 5 Schematic diagram of the structure of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION
[0037] The technical solution of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0038] In addition, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0039] Example 1
[0040] The embodiment of the present invention provides a cross recommendation method based on a local weighted linear regression model, such as Figure 1 As shown, the cross recommendation method based on the local weighted linear regression model includes:
[0041] Step S1: obtaining a user's rating record for at least one target item in a target object and an auxiliary rating record for at least one auxiliary item in an auxiliary object related to the target object.
[0042] Step S2: establishing an item vector for the target item to be evaluated according to the scoring record and the auxiliary scoring record.
[0043] Step S3: Expand the item vector to be evaluated into an augmented vector, and establish a local weighted linear regression model based on the augmented vector.
[0044] Step S4: using the stochastic gradient descent algorithm to solve the local weighted linear regression model and obtain an optimized solution.
[0045] Step S5: Calculate the predicted score of the target item to be rated in the target object according to the optimization solution.
[0046] Step S6: recommending the target items to be rated whose predicted ratings meet the preset rating criteria to the user.
[0047] Through the above steps S1 to S6, the cross-recommendation method based on the local weighted linear regression model of the embodiment of the present invention achieves a full fit between user behavior data and user rating data, thereby improving the accuracy and recall rate of the cross-recommendation system.
[0048] The cross recommendation method based on the local weighted linear regression model according to the embodiment of the present invention is further described below with reference to specific examples.
[0049] Specifically, the above step S1 obtains the user's rating record for at least one target item in the target object and the auxiliary rating record for at least one auxiliary item in the auxiliary object related to the target object. Assuming that the target object is a plurality of movies and the auxiliary objects are a plurality of books, a plurality of songs, etc., the user's ratings for the movies that have been rated among the plurality of movies and the user's ratings for different movie types or different actors are obtained.
[0050] Specifically, in the above step S2, a vector of the target project to be rated is established based on the rating records and the auxiliary rating records. Assume that the collaborative data about users and projects on m different objects are {D1,…,D m}, where the types of items on these objects are different. Although a user's rating information on a certain object may be extremely sparse, he may have quite rich collaborative data on other objects. The purpose of cross-domain collaborative filtering (CDCF) is to transfer knowledge from different auxiliary objects to the target object to improve the rating accuracy and recall rate on the target object.
[0051] Assume D1 is the target object, {D2,…,D m} is an auxiliary object. Let U j and I j Respectively represent in object D j The set of users and items on the target object. According to formula (1), the rating prediction problem on the target object is modeled as an objective function:
[0052] y:U1*I1→R (1)
[0053] Each user-item interaction (u,i)∈U1*I1 can be represented by a binary feature vector , where each binary variable in the vector indicates which user rated which item. In other words, if user u rated item i, the feature vector x is expressed as follows according to formula (2):
[0054]
[0055] The non-zero elements represent user u and item i. The feature vector x can also be expressed sparsely according to formula (3):
[0056] x(u,i)={(u,1),(i,1)} (3)
[0057] After the target object is given a feature vector x(u,i), the vector can be expanded by the collaborative information related to user u from other auxiliary objects. Assume s j (u) represents object D j For each auxiliary object Dj , j = 2, ..., m, using the extended vector Z j (u) to extend x(u,i), Z j The sparseness of (u) is expressed as follows according to formula (4):
[0058]
[0059] in is a real-valued function that depends on the object. According to formula (5), it is defined as follows:
[0060]
[0061] Among them, r j (u,l) represents the rating of item l by user u (if user u has not rated item l, r j (u,l) is assigned to 0), |s j (u)| means in object D j The total number of items rated by user u. represents the normalized result of user u's rating of item l based on the total number of items rated by user u. In practical applications, when |s j When (u)|=0, then
[0062] Based on the above definition, the project vector X to be evaluated can be expressed in sparse form according to formula (6):
[0063]
[0064] Specifically, in one embodiment, if Figure 2 As shown in the figure, M1 represents the scoring matrix of the target object, M2 represents the scoring matrix of the auxiliary object, u1 and u2 represent two different users, and the numbers in the matrix represent the user's scores on each target item and auxiliary item. In the target object scoring matrix, each user-item interaction (u,i)∈U1*I1 can be represented by a binary feature vector To represent it, each binary variable in the vector indicates which user rated which item. So the feature vector corresponding to the rating of 5 can be expressed according to formula (7):
[0065]
[0066] According to formula (4) and formula (5), the expansion vector corresponding to the score 5 in the target object is
[0067]
[0068] Therefore, the vector of the item to be rated corresponding to the score of 5 on the target object can be expressed as The same method can be used to find the vector of items to be rated corresponding to other rating data on the target object.
[0069] In a preferred embodiment, the above step S3, expanding the vector of the item to be evaluated into an augmented vector, includes: adding an intercept term to the vector of the item to be evaluated, expanding the vector of the item to be evaluated into an augmented vector. In one embodiment, the value of the intercept term can be 1. For any extended vector X of (u, i), let its dimension be n, that is, X = (x1,…x n ). First, expand X into an augmented vector That is, add the intercept term x0=1, so
[0070] In a preferred embodiment, in the above step S3, a local weighted linear regression model is established according to formula (8):
[0071]
[0072] Among them, τ represents the preset width parameter, k represents the subscript set of all augmented vectors, and x (k) represents the augmented vector corresponding to the kth target item to be rated by the user, y (k) represents the user's score corresponding to the kth target item to be rated, θ represents the weight vector of the straight line calculated in the local weighted linear regression model, and f(θ) represents the error function of the local weighted linear regression model (when the parameter is θ).
[0073] In practical applications, the value of the preset width parameter τ may be an integer power of 10, for example: 100, 10, 1, 0.1, 0.01, 0.001, etc.
[0074] In a preferred embodiment, if Figure 3 As shown, the above step S4 uses the stochastic gradient descent algorithm to solve the local weighted linear regression model to obtain an optimized solution, including:
[0075] Step S41: Establish a sample set of user rating training items and set the initial value of θ The initial values of the threshold λ and the deviation value b are λ+1;
[0076] Step S42: determine whether the deviation value b is greater than a threshold value λ, and execute step S43 when the deviation value b is greater than the threshold value λ; and execute step S44 when the deviation value b is not greater than the threshold value λ;
[0077] Step S43: Calculate f(θ) according to the θ value, f(θ) and each training item in the scored training item sample set, update θ according to f(θ) to obtain an updated θ value; and calculate an updated f(θ) according to the updated θ value, update the deviation value b to the updated f(θ), and return to step S42;
[0078] Step S44: Set the updated θ value as the optimized solution.
[0079] In practical applications, the above Can be any value, for example Each dimension of is 0.1; in order to ensure the accuracy of the iterative algorithm, the threshold λ can be set to a very small value. In the embodiment of the present invention, the threshold λ is 0.001.
[0080] In a preferred embodiment, the above step S43, according to the θ value, f(θ) and each training item in the scoring training item sample set, calculates f(θ), updates θ according to f(θ), and obtains the updated θ value, including: updating the θ value according to formula (9):
[0081]
[0082] Among them, τ represents the preset width parameter, i represents the subscript set of all augmented vectors, and x (i) represents the augmented vector corresponding to the i-th target item to be evaluated by the user, y (i) represents the user's rating of the i-th target item to be rated, and f(θ) represents the error function value of the local weighted linear regression model (when the parameter is θ) on the sample set of rated training items.
[0083] In a preferred embodiment, the above step S5 calculates the predicted score according to formula (10):
[0084] G=θ T x (10)
[0085] Among them, θ T is the transpose of the optimization solution, and x is the augmented vector of the target item to be evaluated.
[0086] In a preferred embodiment, the above step S6 recommends the target items to be evaluated whose predicted scores meet the preset scoring standard to the user. Assuming the preset scoring standard is 4, if the predicted score of a target item to be evaluated in the target object is 5, the target item is recommended to the customer.
[0087] Through the above steps S1 to S6, the cross-recommendation method based on the local weighted linear regression model of the embodiment of the present invention achieves a full fit between user behavior data and user rating data, thereby improving the accuracy and recall rate of the cross-recommendation system.
[0088] Example 2
[0089] The embodiment of the present invention provides a cross recommendation system based on a local weighted linear regression model, such as Figure 4 As shown, the cross-recommendation system based on the local weighted linear regression model includes: a rating record acquisition module 1, which is used to obtain the user's rating record for at least one target item in the target object and the auxiliary rating record for at least one auxiliary item in the auxiliary object related to the target object; a target vector construction module 2, which is used to establish a target vector for the target item to be evaluated based on the rating record and the auxiliary rating record; a local weighted linear regression model construction module 3, which is used to expand the target vector for the target item to be evaluated into an augmented vector, and establish a local weighted linear regression model based on the augmented vector; an optimization solution solving module 4, which is used to solve the local weighted linear regression model using a stochastic gradient descent algorithm to obtain an optimized solution; a predicted rating calculation module 5, which calculates the predicted rating of the target item to be evaluated in the target object based on the optimized solution; and a project recommendation module 6, which is used to recommend the target item to be evaluated whose predicted rating meets the preset rating standard to the user.
[0090] Through the collaborative work among the above-mentioned components, the cross-recommendation system based on the local weighted linear regression model of the embodiment of the present invention achieves a full fit between user behavior data and user rating data, thereby improving the accuracy and recall rate of the cross-recommendation system.
[0091] The cross recommendation method based on the local weighted linear regression model according to the embodiment of the present invention is further described below with reference to specific examples.
[0092] Specifically, the rating record acquisition module 1 is used to acquire the user's rating record for at least one target item in the target object and the auxiliary rating record for at least one auxiliary item in the auxiliary object related to the target object. Assuming that the target object is a plurality of movies and the auxiliary objects are a plurality of books, a plurality of songs, etc., the user's ratings for the movies that have been rated among the plurality of movies and the user's ratings for different movie types or different actors are acquired.
[0093] Specifically, the above-mentioned target vector construction module 2 is used to establish the target vector of the target project to be evaluated according to the scoring record and the auxiliary scoring record. The establishment process of the above-mentioned target vector is specifically described in step S2 of embodiment 1, which will not be repeated here.
[0094] Specifically, the above-mentioned local weighted linear regression model construction module 3 is used to expand the vector of the project to be evaluated into an augmented vector, and establish a local weighted linear regression model based on the augmented vector. The specific process of expanding the vector of the project to be evaluated into an augmented vector and establishing a local weighted linear regression model is described in the relevant description of step S3 in Example 1, which will not be repeated here.
[0095] In a preferred embodiment, the above-mentioned optimization solution solving module 4 is used to perform the following steps:
[0096] Step S41: Establish a sample set of user rating training items and set the initial value of θ The initial values of the threshold λ and the deviation value b are λ+1;
[0097] Step S42: determine whether the deviation value b is greater than a threshold value λ, and execute step S43 when the deviation value b is greater than the threshold value λ; and execute step S44 when the deviation value b is not greater than the threshold value λ;
[0098] Step S43: Calculate f(θ) according to the θ value, f(θ) and each training item in the scored training item sample set, update θ according to f(θ) to obtain an updated θ value; and calculate an updated f(θ) according to the updated θ value, update the deviation value b to the updated f(θ), and return to step S42;
[0099] Step S44: Set the updated θ value as the optimized solution.
[0100] Specifically, the above step S43 calculates f(θ) according to the θ value, f(θ) and each training item in the scored training item sample set, updates θ according to f(θ) to obtain an updated θ value, including: updating the θ value according to formula (9) in Example 1:
[0101]
[0102] Among them, τ represents the preset width parameter, i represents the subscript set of all augmented vectors, and x (i) represents the augmented vector corresponding to the i-th target item to be evaluated by the user, y (i) represents the user's rating of the i-th target item to be rated, and f(θ) represents the error function value of the local weighted linear regression model (when the parameter is θ) on the sample set of rated training items.
[0103] Specifically, the above-mentioned prediction score calculation module 5 is used to calculate the prediction score according to formula (10) in Example 1:
[0104] G=θ T x (10)
[0105] Among them, θ Tis the transpose of the optimization solution, and x is the augmented vector of the target item to be evaluated.
[0106] Specifically, the project recommendation module 6 is used to recommend the target project to be evaluated whose predicted score meets the preset scoring standard to the user. Assuming the preset scoring standard is 4, if the predicted score of a target project to be evaluated in the target object is 5, the target project is recommended to the customer.
[0107] Through the collaborative work among the above-mentioned components, the cross-recommendation system based on the local weighted linear regression model of the embodiment of the present invention achieves a full fit between user behavior data and user rating data, thereby improving the accuracy and recall rate of the cross-recommendation system.
[0108] Example 3
[0109] An embodiment of the present invention provides a non-transitory computer storage medium, which stores computer executable instructions, and the computer executable instructions can execute the cross recommendation method based on the local weighted linear regression model in any of the above-mentioned embodiments 1. Among them, the above-mentioned storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory (Flash Memory), a hard disk (HDD) or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above-mentioned types of memory.
[0110] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0111] Example 4
[0112] The embodiment of the present invention provides an electronic device of a cross recommendation method based on a local weighted linear regression model, and its structural schematic diagram is shown in FIG. Figure 5 As shown, the device includes: one or more processors 410 and a memory 420, Figure 5 A processor 410 is taken as an example.
[0113] The electronic device that executes the cross recommendation method based on the local weighted linear regression model may further include: an input device 430 and an output device 440 .
[0114] The processor 410, the memory 420, the input device 430 and the output device 440 may be connected via a bus or other means. Figure 5 The example of connecting through bus is taken in the following.
[0115] The processor 410 may be a central processing unit (CPU). The processor 410 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips. A general-purpose processor may be a microprocessor or the processor may be any conventional processor.
[0116] The memory 420, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer executable programs and modules, such as the program instructions / modules corresponding to the cross-recommendation method based on the local weighted linear regression model in the embodiment of the present application. The processor 410 executes various functional applications and data processing of the server by running the non-transitory software programs, instructions and modules stored in the memory 420, that is, implements the cross-recommendation method based on the local weighted linear regression model of the above method embodiment.
[0117] The memory 420 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created according to the use of the processing device for chip tracing and debugging, etc. In addition, the memory 420 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 420 may optionally include a memory remotely arranged relative to the processor 410, and these remote memories may be connected to the cross-recommendation device based on the local weighted linear regression model via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0118] The input device 430 can receive input digital or character information and generate key signal input related to user settings and function control related to the processing device for cross-recommendation operation based on the local weighted linear regression model. The output device 440 can include a display device such as a display screen.
[0119] One or more modules are stored in the memory 420, and when executed by one or more processors 410, the execution is as follows: Figure 1-Figure 3 The method shown.
[0120] The above-mentioned product can execute the method provided by the embodiment of the present invention, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not fully described in the embodiment of the present invention, please refer to Figure 1-Figure 3 Related description of the illustrated embodiment.
[0121] Obviously, the above embodiments are merely examples for the purpose of clear explanation, and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived therefrom are still within the scope of protection of the invention.
Claims
1. A cross recommendation method based on a local weighted linear regression model, characterized in that: include: Acquire a user's scoring record of at least one target item in a target object and an auxiliary scoring record of at least one auxiliary item in an auxiliary object related to the target object; the auxiliary item and the target item are of different types; Establishing a to-be-rated project vector for the to-be-rated target project according to the scoring record and the auxiliary scoring record; Expanding the to-be-evaluated item vector into an augmented vector, and establishing a local weighted linear regression model according to the augmented vector; Using a stochastic gradient descent algorithm, the local weighted linear regression model is solved to obtain an optimized solution; Calculate the predicted score of the target item to be rated in the target object according to the optimization solution; Recommending the target project to be rated whose predicted rating meets the preset rating standard to the user; The vector of the item to be evaluated is expressed in sparse form according to the following formula: Where x represents the vector of the item to be evaluated; u represents the user; i represents the item; s2(u),...,s m (u) represents auxiliary object D j All items rated by user u, j = 2, ..., m; {(u, 1), (i, 1)} is a sparse representation feature vector; z2(u), ..., z m (u) represents the feature vector of user u in each auxiliary domain; The step of expanding the to-be-evaluated item vector into an augmented vector includes: Adding an intercept term to the vector of the item to be evaluated, expanding the vector of the item to be evaluated into an augmented vector, wherein the value of the intercept term is 1; The local weighted linear regression model is established according to the following formula: Wherein, τ represents the preset width parameter, k represents the subscript set of all the augmented vectors, and x (k) represents the augmented vector corresponding to the kth target item to be evaluated by the user, y (k) represents the score of the user for the kth target item to be rated, θ represents the weight vector of the straight line calculated in the local weighted linear regression model, and f(θ) represents the error function of the local weighted linear regression model (when the parameter is θ); The prediction score is calculated according to the following formula: G=θ T x Among them, θ T is the transpose of the optimization solution, and x is the augmented vector of the target item to be evaluated.
2. The cross recommendation method based on the local weighted linear regression model according to claim 1, characterized in that: The method of solving the local weighted linear regression model by using a stochastic gradient descent algorithm to obtain an optimized solution includes: Step S41: Establish a sample set of scoring training items for the user, and set the initial value of θ The initial values of the threshold λ and the deviation value b are λ+1; Step S42: Determine whether the deviation value b is greater than the threshold value λ, and execute step S43 when the deviation value b is greater than the threshold value λ; and execute step S44 when the deviation value b is not greater than the threshold value λ; Step S43: Calculate f(θ) according to the θ value, f(θ) and each training item in the scoring training item sample set, update θ according to f(θ) to obtain an updated θ value; and calculate the updated f(θ) according to the updated θ value, update the deviation value b to the updated f(θ), and return to step S42; Step S44: setting the updated θ value as the optimized solution.
3. The cross recommendation method based on the local weighted linear regression model according to claim 2, characterized in that: The step of calculating f(θ) according to the θ value, f(θ) and each training item in the scoring training item sample set, and updating θ according to f(θ) to obtain an updated θ value includes: Update the θ value according to the following formula: Wherein, τ represents the preset width parameter, i represents the subscript set of all the augmented vectors, and x (i) represents the augmented vector corresponding to the i-th target item to be evaluated by the user, y (i) represents the score of the user for the i-th target item to be rated, and f(θ) represents the error function value of the local weighted linear regression model (when the parameter is θ) on the sample set of rated training items.
4. A cross recommendation system based on a local weighted linear regression model, characterized in that: include: A scoring record acquisition module (1) is used to acquire a user's scoring record for at least one target item in a target object and an auxiliary scoring record for at least one auxiliary item in an auxiliary object related to the target object; the auxiliary item and the target item are of different types; A target vector construction module (2) is used to construct a target vector for the target project to be evaluated according to the scoring record and the auxiliary scoring record; A local weighted linear regression model building module (3) is used to expand the to-be-evaluated item vector into an augmented vector and to establish a local weighted linear regression model according to the augmented vector; An optimization solution solving module (4) is used to solve the local weighted linear regression model using a stochastic gradient descent algorithm to obtain an optimization solution; A prediction score calculation module (5) is used to calculate the prediction score of the target item to be evaluated in the target object according to the optimization solution; A project recommendation module (6), used for recommending the target project to be rated whose predicted rating meets the preset rating standard to the user; The vector of the item to be evaluated is expressed in sparse form according to the following formula: Where x represents the vector of the item to be evaluated; u represents the user; i represents the item; s2(u),...,s m (u) represents auxiliary object D j All items rated by user u, j = 2, ..., m; {(u, 1), (i, 1)} is a sparse representation feature vector; z2(u), ..., z m (u) represents the feature vector of user u in each auxiliary domain; The step of expanding the to-be-evaluated item vector into an augmented vector includes: Adding an intercept term to the vector of the item to be evaluated, expanding the vector of the item to be evaluated into an augmented vector, wherein the value of the intercept term is 1; The local weighted linear regression model is established according to the following formula: Wherein, τ represents the preset width parameter, k represents the subscript set of all the augmented vectors, and x (k) represents the augmented vector corresponding to the kth target item to be evaluated by the user, y (k) represents the score of the user for the kth target item to be rated, θ represents the weight vector of the straight line calculated in the local weighted linear regression model, and f(θ) represents the error function of the local weighted linear regression model (when the parameter is θ); The prediction score is calculated according to the following formula: G=θ T x Among them, θ T is the transpose of the optimization solution, and x is the augmented vector of the target item to be evaluated.
5. The cross recommendation system based on the local weighted linear regression model according to claim 4, characterized in that: The optimization solution finding module (4) is used to perform the following steps: Step S41: Establish a sample set of scoring training items for the user, and set the initial value of θ The initial values of the threshold λ and the deviation value b are λ+1; Step S42: Determine whether the deviation value b is greater than the threshold value λ, and execute step S43 when the deviation value b is greater than the threshold value λ; and execute step S44 when the deviation value b is not greater than the threshold value λ; Step S43: Calculate f(θ) according to the θ value, f(θ) and each training item in the scoring training item sample set, and update θ according to f(θ) to obtain an updated θ value; and calculating the updated f(θ) according to the updated θ value, updating the deviation value b to the updated f(θ), and returning to step S42; Step S44: setting the updated θ value as the optimized solution.
6. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the cross-recommendation method based on a local weighted linear regression model as described in any one of claims 1 to 3 is implemented.
7. An electronic device, characterized in that: include: at least one processor (410); and a memory (420) communicatively connected to the at least one processor (410), wherein: The memory (420) stores instructions that can be executed by the at least one processor (410), and the instructions are executed by the at least one processor (410) so that the at least one processor (410) executes the cross-recommendation method based on the local weighted linear regression model described in any one of claims 1 to 3.
