CN111368216A - Movie and television recommendation method based on mixed collaborative filtering - Google Patents
Movie and television recommendation method based on mixed collaborative filtering Download PDFInfo
- Publication number
- CN111368216A CN111368216A CN202010151996.1A CN202010151996A CN111368216A CN 111368216 A CN111368216 A CN 111368216A CN 202010151996 A CN202010151996 A CN 202010151996A CN 111368216 A CN111368216 A CN 111368216A
- Authority
- CN
- China
- Prior art keywords
- user
- items
- score
- item
- scoring
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 47
- 238000001914 filtration Methods 0.000 title claims abstract description 21
- 239000011159 matrix material Substances 0.000 claims abstract description 34
- 230000003044 adaptive effect Effects 0.000 claims abstract description 14
- 230000000694 effects Effects 0.000 claims description 6
- 238000011156 evaluation Methods 0.000 claims 1
- 238000004364 calculation method Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 238000012163 sequencing technique Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/953—Querying, e.g. by the use of web search engines
- G06F16/9536—Search customisation based on social or collaborative filtering
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/70—Information retrieval; Database structures therefor; File system structures therefor of video data
- G06F16/73—Querying
- G06F16/735—Filtering based on additional data, e.g. user or group profiles
Abstract
The invention relates to a movie and television recommendation method based on mixed collaborative filtering. The method comprises the steps of firstly, collecting scores of users on projects in a MovieLens data set and forming a user-project score matrix; carrying out missing value filling processing on the user-project scoring matrix, predicting the scoring value of an element with the scoring value of 0 in the scoring matrix by calculating the similarity between projects, and filling the predicted scoring value into the matrix; calculating the similarity between users and between projects by using the adjusted cosine similarity to respectively obtain nearest neighbor sets, and further respectively calculating the prediction score values of the users to unscored projects; and effectively combining the user-based and project-based prediction score values through adaptive weights to form comprehensive recommendations. The method and the device can solve the problem of low performance caused by sparse scoring matrix, and effectively combine the prediction result based on the user and the prediction result based on the project by using the self-adaptive weight to solve the problem of cold start.
Description
Technical Field
The invention relates to the field of movie recommendation, in particular to a movie recommendation method based on mixed collaborative filtering.
Background
With the rapid development of internet technology, the way for people to send and receive information is more and more simple, the amount of information spread in the internet environment is soaring, and people cannot or are difficult to find the required information in a short time. However, most users do not know their specific needs and cannot accurately acquire the information they want. The personalized recommendation system can find the requirements of different users through a recommendation algorithm, and one-to-one personalized recommendation service is realized for the users. For example, Facebook recommends people who you may know from friends, the Taobao may provide new product recommendations based on purchased products and browsing records, and the online education service may accurately recommend learning resources to users based on personal needs.
The information filtering technology is a common means for realizing personalized recommendation, and projects (movie and television works, music, publications, friends, news, web pages and the like) with higher feature similarity are recommended to a user after the user features are found. In addition to collaborative filtering algorithms, some scholars also apply the K-nearest neighbor method to the recommendation system, which gives recommendations by evaluating relationships between items or between users, in the sense that users are transformed into item space by treating them as a collection of scored items.
However, there are still some problems with conventional collaborative filtering, and whether some methods can be used to overcome these deficiencies and to propose improved recommendation algorithms is a matter of concern to researchers. Aiming at the problems, a hybrid collaborative filtering recommendation algorithm based on self-adaptive weight is provided.
Disclosure of Invention
The invention provides a movie recommendation method based on mixed collaborative filtering, which aims to solve the problems of cold start, sparse scoring matrix and the like in the existing collaborative filtering recommendation algorithm in the movie recommendation method.
The technical scheme of the invention is as follows: a movie recommendation method based on mixed collaborative filtering comprises the following specific steps:
step1, collecting the scoring data of the project from the user to form a user-project scoring matrix;
step2, filling a training set represented by a user-item score matrix by using a score prediction method based on items;
step3, predicting the score value of the unscored items of the target user in the test set by adopting a user-based score prediction method;
step4, predicting the score value of the unscored items of the target user in the test set by adopting a project-based score prediction method;
step5, adopting adaptive weight to effectively combine the user-based and project-based prediction score values;
step6, evaluating the prediction effect by adopting MAE and RMSE;
further, in Step1, the collecting the rating data of the user on the project to form a user-project rating matrix includes: collecting the scoring values of n items by m users in the MovieLens data set, dividing the scoring values into a test set and a training set, and forming a user-item scoring matrix by the data in the test set.
Further, in Step2, the populating a training set represented by the user-item score matrix using the item-based score prediction method includes:
finding the union of the item sets evaluated by the user u and the user v as Iu,v;
User v is in set Iu,vThe set of items not evaluated in (1) is Nv;
For any item j ∈ NvComputing item j and set Iu,vSimilarity among other projects in the tree is determined, and nearest neighbors are found out;
and predicting the scores of the users v on the items j and filling the scores into a score matrix.
Further, in Step3, the predicting the score value of the non-scored item of the target user in the test set by using the user-based score prediction method includes:
calculating the similarity between the target user and all users in the scoring matrix;
sorting according to the similarity, and finding out the nearest neighbor of the target user;
and predicting the scoring value of the target user on the unscored items of the target user.
Further, in Step4, the predicting the score value of the unscored item of the target user in the test set by using the item-based score prediction method includes:
calculating the similarity between the unscored items of the target user and all the items in the scoring matrix;
sorting according to the similarity, and finding out the nearest neighbor of the unscored project;
and predicting the scoring value of the target user on the unscored items of the target user.
Further, in Step5, the effectively combining the user-based and project-based predicted score values with adaptive weights includes:
calculating out adjustable factors β and 1- β according to the nearest neighbor numbers of the users and the items found by the item-based method and the user-based method, wherein the adjustable factors represent the recommendation capacities of the items and the users respectively;
utilizing similarity of target user and user in nearest neighbor set to obtain balance factor α of userU;
The similarity between the target item and the items in the nearest neighbor set is used to obtain a balance factor α of the itemsI;
Combining the adjustable factor and the balance factor to form the adaptive user weight omegaUAnd adaptive term weight ωI;
And carrying out weighted summation on the scoring predicted values based on the items and the users by using the self-adaptive weight to obtain a comprehensive recommendation result.
Further, in Step6, the evaluating the predicted effect by using the MAE and the RMSE includes:
calculating an average absolute error MAE and a root mean square error RMSE;
and calculating the error between the predicted value and the actual value to evaluate the recommendation result.
The movie recommendation method based on mixed collaborative filtering firstly collects the rating values of the users to the projects in the movie recommendation website, divides the collected data into a training set and a test set according to the users, and takes the training set as a user-project rating matrix. And filling the elements with the score value of 0 in the user-project score matrix by adopting a project-based score prediction method through the steps of similarity calculation, nearest neighbor searching, prediction score calculation, missing value filling and the like. And calculating the similarity between the target user in the test set and each user in the training set, finding out a nearest neighbor set based on the users through similarity sequencing, and obtaining the prediction score value of the target user to the unscored items through a user-based item score prediction method. And calculating the similarity between the unscored items of the target user in the test set and each item in the training set, and obtaining the predicted scoring value of the unscored items of the target user by a scoring prediction method based on the items. And obtaining an adjustable factor by using the number of nearest neighbors, obtaining a balance factor by using the similarity between the target user and the unscored items and the nearest neighbors thereof, combining the balance factor and the adjustable factor to provide self-adaptive weight, and carrying out weighted summation on the item-based prediction result and the user-based prediction result to obtain a final recommendation result.
The invention has the beneficial effects that: the traditional collaborative filtering recommendation model faces serious data sparseness and cold start in the aspect of score value prediction, performance is reduced, the score value of an element with the score value of 0 in a score matrix is predicted by calculating the similarity between projects, and the problem of low performance caused by sparse score matrix is solved. Adaptive weights are used to effectively combine user-based and project-based predictions to mitigate cold start problems.
Drawings
FIG. 1 is a flow chart of the present invention.
Detailed Description
Step1, collecting the scoring data of the project from the user to form a user-project scoring matrix;
step2, filling a training set represented by a user-item score matrix by using a score prediction method based on items;
step3, predicting the score value of the unscored items of the target user in the test set by adopting a user-based score prediction method;
step4, predicting the score value of the unscored items of the target user in the test set by adopting a project-based score prediction method;
step5, adopting adaptive weight to effectively combine the user-based and project-based prediction score values;
step6, adopting MAE and RMSE to evaluate the prediction effect, and the flow chart is shown in figure 1;
further, in Step1, the collecting the rating data of the user on the project to form a user-project rating matrix includes: collecting the scoring values of n items by m users in the MovieLens data set, dividing the scoring values into a test set and a training set, and forming a user-item scoring matrix by the data in the test set.
Further, in Step2, the populating a training set represented by the user-item score matrix using the item-based score prediction method includes:
finding the union of the item sets evaluated by the user u and the user v as Iu,v;
User v is in set Iu,vThe set of items not evaluated in (1) is Nv;
For any item j ∈ NvComputing item j and set Iu,vSimilarity among other projects in the tree is determined, and nearest neighbors are found out;
and predicting the scores of the users v on the items j and filling the scores into a score matrix.
Further, in Step3, the predicting the score value of the non-scored item of the target user in the test set by using the user-based score prediction method includes:
calculating the similarity between the target user and all users in the scoring matrix;
sorting according to the similarity, and finding out the nearest neighbor of the target user;
and predicting the scoring value of the target user on the unscored items of the target user.
Further, in Step4, the predicting the score value of the unscored item of the target user in the test set by using the item-based score prediction method includes:
calculating the similarity between the unscored items of the target user and all the items in the scoring matrix;
sorting according to the similarity, and finding out the nearest neighbor of the unscored project;
and predicting the scoring value of the target user on the unscored items of the target user.
Further, in Step5, the effectively combining the user-based and project-based predicted score values with adaptive weights includes:
calculating out adjustable factors β and 1- β according to the nearest neighbor numbers of the users and the items found by the item-based method and the user-based method, wherein the adjustable factors represent the recommendation capacities of the items and the users respectively;
utilizing similarity of target user and user in nearest neighbor set to obtain balance factor α of userU;
The similarity between the target item and the items in the nearest neighbor set is used to obtain a balance factor α of the itemsI;
Combining the adjustable factor and the balance factor to form the adaptive user weight omegaUAnd adaptive term weight ωI;
And carrying out weighted summation on the scoring predicted values based on the items and the users by using the self-adaptive weight to obtain a comprehensive recommendation result.
Further, in Step6, the evaluating the predicted effect by using the MAE and the RMSE includes:
calculating an average absolute error MAE and a root mean square error RMSE;
and calculating the error between the predicted value and the actual value to evaluate the recommendation result.
While the present invention has been described in detail with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, and various changes can be made without departing from the spirit of the present invention within the knowledge of those skilled in the art.
Claims (7)
1. A movie recommendation method based on mixed collaborative filtering is characterized in that: the movie recommendation method based on the mixed collaborative filtering comprises the following specific steps:
step1, collecting the scoring data of the project from the user to form a user-project scoring matrix;
step2, filling a training set represented by a user-item score matrix by using a score prediction method based on items;
step3, predicting the score value of the unscored items of the target user in the test set by adopting a user-based score prediction method;
step4, predicting the score value of the unscored items of the target user in the test set by adopting a project-based score prediction method;
step5, adopting adaptive weight to effectively combine the user-based and project-based prediction score values;
step6, evaluation of the predicted effect using MAE and RMSE.
2. The movie recommendation method based on hybrid collaborative filtering according to claim 1, characterized in that: in Step1, collecting the rating data of the user on the project to form a user-project rating matrix includes: collecting the scoring values of n items by m users in the MovieLens data set, dividing the scoring values into a test set and a training set, and forming a user-item scoring matrix by the data in the test set.
3. The movie recommendation method based on hybrid collaborative filtering according to claim 1, characterized in that: the Step of filling the training set represented by the user-item score matrix by using the item-based score prediction method in Step2 includes:
finding the union of the item sets evaluated by the user u and the user v as Iu,v;
User v is in set Iu,vThe set of items not evaluated in (1) is Nv;
For any item j ∈ NvComputing item j and set Iu,vSimilarity among other projects in the tree is determined, and nearest neighbors are found out;
and predicting the scores of the users v on the items j and filling the scores into a score matrix.
4. The movie recommendation method based on hybrid collaborative filtering according to claim 1, characterized in that: the Step of predicting the score value of the unscored item of the target user in the test set by adopting a user-based score prediction method in Step3 comprises the following steps:
calculating the similarity between the target user and all users in the scoring matrix;
sorting according to the similarity, and finding out the nearest neighbor of the target user;
and predicting the scoring value of the target user on the unscored items of the target user.
5. The movie recommendation method based on hybrid collaborative filtering according to claim 1, characterized in that: the Step of predicting the score value of the unscored item of the target user in the test set by adopting a score prediction method based on the item in Step4 comprises the following steps:
calculating the similarity between the unscored items of the target user and all the items in the scoring matrix;
sorting according to the similarity, and finding out the nearest neighbor of the unscored project;
and predicting the scoring value of the target user on the unscored items of the target user.
6. The movie recommendation method based on hybrid collaborative filtering according to claim 1, characterized in that: the Step of effectively combining the user-based and project-based predicted score values with adaptive weights at Step5 includes:
calculating out adjustable factors β and 1- β according to the nearest neighbor numbers of the users and the items found by the item-based method and the user-based method, wherein the adjustable factors represent the recommendation capacities of the items and the users respectively;
using target users and recencyThe similarity of users in the neighbor set is obtained as a balance factor αU;
The similarity between the target item and the items in the nearest neighbor set is used to obtain a balance factor α of the itemsI;
Combining the adjustable factor and the balance factor to form the adaptive user weight omegaUAnd adaptive term weight ωI;
And carrying out weighted summation on the scoring predicted values based on the items and the users by using the self-adaptive weight to obtain a comprehensive recommendation result.
7. The movie recommendation method based on hybrid collaborative filtering according to claim 1, characterized in that: in Step6, the evaluating the predicted effect by using the MAE and the RMSE includes:
calculating an average absolute error MAE and a root mean square error RMSE;
and calculating the error between the predicted value and the actual value to evaluate the recommendation result.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010151996.1A CN111368216A (en) | 2020-03-06 | 2020-03-06 | Movie and television recommendation method based on mixed collaborative filtering |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010151996.1A CN111368216A (en) | 2020-03-06 | 2020-03-06 | Movie and television recommendation method based on mixed collaborative filtering |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111368216A true CN111368216A (en) | 2020-07-03 |
Family
ID=71211767
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010151996.1A Pending CN111368216A (en) | 2020-03-06 | 2020-03-06 | Movie and television recommendation method based on mixed collaborative filtering |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111368216A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111931075A (en) * | 2020-10-19 | 2020-11-13 | 腾讯科技(深圳)有限公司 | Content recommendation method and device, computer equipment and storage medium |
CN114547279A (en) * | 2022-02-21 | 2022-05-27 | 电子科技大学 | Judicial recommendation method based on mixed filtering |
-
2020
- 2020-03-06 CN CN202010151996.1A patent/CN111368216A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111931075A (en) * | 2020-10-19 | 2020-11-13 | 腾讯科技(深圳)有限公司 | Content recommendation method and device, computer equipment and storage medium |
CN114547279A (en) * | 2022-02-21 | 2022-05-27 | 电子科技大学 | Judicial recommendation method based on mixed filtering |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11893071B2 (en) | Content recommendation method and apparatus, electronic device, and storage medium | |
CN108256093B (en) | Collaborative filtering recommendation algorithm based on multiple interests and interest changes of users | |
CN112765486B (en) | Knowledge graph fused attention mechanism movie recommendation method | |
US8589434B2 (en) | Recommendations based on topic clusters | |
CN108647996A (en) | A kind of personalized recommendation method and system based on Spark | |
CN110929161B (en) | Large-scale user-oriented personalized teaching resource recommendation method | |
CN105095187A (en) | Search intention identification method and device | |
CN107016122B (en) | Knowledge recommendation method based on time migration | |
Li | Quality, evaluation and recommendation for learning object | |
CN112612951B (en) | Unbiased learning sorting method for income improvement | |
CN111368216A (en) | Movie and television recommendation method based on mixed collaborative filtering | |
CN113806630A (en) | Attention-based multi-view feature fusion cross-domain recommendation method and device | |
CN108920647B (en) | Low-rank matrix filling TOP-N recommendation method based on spectral clustering | |
Herath et al. | Intelligent Recommendations for e-Learning Personalization Based on Learner's Learning Activities and Performances | |
Aliannejadi et al. | User model enrichment for venue recommendation | |
CN115577185A (en) | Muting course recommendation method and device based on mixed reasoning and mesopic group decision | |
CN111831918A (en) | Mixed recommendation system in online education scene | |
Zhao et al. | Research on online course recommendation model based on improved collaborative filtering algorithm | |
CN111949894A (en) | Collaborative filtering personalized recommendation method based on multi-space interaction | |
Li et al. | A personalized recommendation algorithm for college books based on user interest | |
CN115809376A (en) | Intelligent recommendation method based on big teaching data | |
Zhu | A book recommendation algorithm based on collaborative filtering | |
CN110825967B (en) | Recommendation list re-ranking method for improving diversity of recommendation system | |
CN110851707B (en) | Intelligent recommendation method for building material bidding platform | |
Liu et al. | Multi-domain collaborative recommendation with feature selection |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20200703 |