improve collaborative filter using genetic algorithms

合集下载

自适应中值与高斯滤波相结合matlab

自适应中值与高斯滤波相结合matlab

自适应中值与高斯滤波相结合matlab英文版Combination of Adaptive Median and Gaussian Filtering in MATLABIntroductionIn the realm of digital image processing, filtering techniques play a crucial role in enhancing image quality and reducing noise. Two widely used filtering methods are the median filter and the Gaussian filter. Each has its unique strengths and weaknesses. The median filter is excellent at removing salt-and-pepper noise, while the Gaussian filter is more effective at suppressing Gaussian noise. This article explores the integration of these two filters traditional, median creating filter a. hybrid It approach dynamically that selects combines the their filter respective size advantages based using on MATLAB.Adaptive Median Filtering theAdaptive median filtering is an enhanced version of the local noise characteristics, rather than using a fixed filter size. This approach is particularly useful in scenarios where the noise density and distribution vary spatially.Gaussian FilteringGaussian filtering is a linear smoothing process that reduces noise by convolving the image with a Gaussian function. It is effective at suppressing Gaussian noise but may not perform well against salt-and-pepper noise.Combination of Adaptive Median and Gaussian FilteringBy combining adaptive median and Gaussian filtering, we can create a more robust filtering approach. The adaptive median filter is first applied to remove salt-and-pepper noise. Then, the Gaussian filter is used to further smoothen the image and suppress Gaussian noise.Implementation in MATLABMATLAB provides convenient functions for both adaptive median and Gaussian filtering. The medfilt2 function can beused for median filtering, while the imgaussfilt function is suitable for Gaussian filtering. By combining these functions, we can implement the hybrid filtering approach.ConclusionThe integration of adaptive median and Gaussian filtering in MATLAB offers a powerful tool for enhancing image quality. This approach combines the strengths of both filters, effectively removing both salt-and-pepper noise and Gaussian noise. By leveraging the capabilities of MATLAB, we can easily implement this hybrid filtering method and achieve superior image processing results.中文版自适应中值与高斯滤波相结合的MATLAB实现引言在数字图像处理领域,滤波技术对于提高图像质量和减少噪声起着至关重要的作用。

改进阈值函数的指纹图像去噪方法

改进阈值函数的指纹图像去噪方法

改进阈值函数的指纹图像去噪方法作者:张兆茹,邓彩霞,岳欣华来源:《哈尔滨理工大学学报》2022年第01期摘要:为了使指纹识别技术更加准确和识别效率更高,提出了改进的阈值函数对指纹图像进行去噪。

首先针对指纹图像的特点,构造了一个改进的阈值函数,该阈值函数与传统软、硬阈值函数及某些现有改进阈值函数相比,具有很好的可调性,并且是处处可导的,其更好地逼近软阈值函数,且在阈值点处的图像更加光滑,在对图像去噪时能够更多的保留其上的真实信息,同时有效的滤除噪声。

仿真实验表明,改进的阈值函數处理后的图像峰值信噪比和结构相似度高、均方根误差和扭曲程度小且相关系数大,能够更加接近于原图像,因此改进的阈值函数具有很好的应用价值。

关键词:阈值函数;指纹图像去噪;峰值信噪比;结构相似度;均方根误差DOI:10.15938/j.jhust.2022.01.008中图分类号: TN911.73 文献标志码: A 文章编号: 1007-2683(2022)01-0055-06Fingerprint Image Denoising Method Basedon Improved Threshold FunctionZHANG Zhaoru,DENG Caixia,YUE Xinhua(School of Sciences, Harbin University of Science and Technology, Harbin 150080,China)Abstract:In order to make fingerprint identification technology more accurate and efficient,an improved threshold function is proposed to denoise fingerprint images. First, according to the characteristics of fingerprint images, an improved threshold function is constructed. Compared with traditional soft and hard threshold functions and some existing improved threshold functions, this threshold function has good adjustability, and is adjustable everywhere. It is better to approximate the soft threshold function, and the image at the threshold point is smoother. When denoising the image, it can retain more real information on it and effectively filter out the noise. Simulation experiments show that the improved threshold function has high peak signaltonoise ratio and structure similarity, small root mean square error and distortion degree, and better correlation coefficient,and can be closer to the original image. Therefore, the improved threshold function has good application value.Keywords:threshold function; fingerprint image denoising; peak signaltonoise ratio; structural similarity; rootmeansquare0引言指纹图像以其具有唯一性、稳定性、可采集性、与主体永可分离性等优点[1-2],已成为身份识别的有效手段,被广泛应用于刑事侦查和安全验证中。

基于用户项目属性偏好的协同过滤推荐算法

基于用户项目属性偏好的协同过滤推荐算法

基于用户项目属性偏好的协同过滤推荐算法吕成戍【期刊名称】《计算机技术与发展》【年(卷),期】2018(028)004【摘要】Collaborative filtering recommendation system is one of the most widely used recommendation technologies,but it owns the disadvantages of lower recommendation precision and shilling attack.In order to improve the recommendation precision and capability of attack resistance for traditional collaborative filtering recommendation system,we present a robust collaborative filtering recommendation algorithm based on user preference of item attributes.First,user preference similarity of item attributes is introduced in the calculation of user similarity and synthesized with traditional item rating similarity through dynamic weighed factor to get users' synthetical similarity. The user similarity can be also measured according to the same item attribute preference in the case of lacking user's common score,so as to alleviate the sparsity of the scoringdata.While predicting the rating for the target user,the user preference of item attributes is used to filter shilling attack in nearest neighborset,eliminating adverse impact of the shilling attack to predictedrating,improving the system a-bility against the shilling attack.The experiments show that the proposed algorithm can effectively enhance the recommendation precision and anti-attack capability of recommendationsystem.%协同过滤推荐系统是广泛应用的推荐技术之一,但是其面临着推荐精度低和托攻击问题.为了提高传统协同过滤推荐系统的推荐精度和抗攻击能力,提出了一种基于用户项目属性偏好的鲁棒协同过滤推荐算法.该算法在用户相似性计算过程中引入用户项目属性偏好相似性,并通过动态加权因子与传统的用户评分相似性进行组合,获得用户的综合相似性,在用户共同评分项匮乏的情况下也可以根据相同的项目属性偏好度量用户相似性,缓解评分数据稀疏性.在预测评分阶段,根据用户项目属性偏好类型条件过滤最近邻集合中的攻击概貌,消除攻击概貌对评分预测的不良影响,提高系统的抗攻击能力.实验结果表明,该算法可以有效提高推荐系统的推荐精度和抗攻击能力.【总页数】6页(P152-156,160)【作者】吕成戍【作者单位】东北财经大学管理科学与工程学院,辽宁大连116025【正文语种】中文【中图分类】TP311【相关文献】1.基于用户偏好和项目属性的协同过滤推荐算法 [J], 姚平平;邹东升;牛宝君2.基于项目属性偏好挖掘的协同过滤推荐算法 [J], 陈颖;侯惠敏3.基于用户评分和项目类偏好的协同过滤推荐算法 [J], 王宇飞;宋俊典;戴炳荣4.基于用户偏好和项目特征的协同过滤推荐算法 [J], 张应辉;司彩霞5.融合用户属性偏好相似性的协同过滤推荐算法研究 [J], 杨云;魏燕荣因版权原因,仅展示原文概要,查看原文内容请购买。

Collaborative filtering with the simple bayesian classifier

Collaborative filtering with the simple bayesian classifier

Collaborative Filtering with the Simple Bayesian ClassifierKoji Miyahara1 and Michael J. Pazzani21 Information Technology R&D CenterMitsubishi Electric Corporation5-1-1 Ofuna, Kamakura, Kanagawa 247-8501, JAPANmiya@isl.melco.co.jp2 Department of Information and Computer ScienceUniversity of California, IrvineIrvine, CA 92697-3425, USApazzani@Abstract:Many collaborative filtering enabled Web sites that recommend books, CDs, movies, videos and so on, have become very popular on Internet. They recommend items to a user based on the opinions of other users with similar tastes. In this paper, we discuss an approach to collaborative filtering based on the simple Bayesian classifier. The simple Bayesian classifier is one of the most successful supervised machine-learning algorithms. It performs well in various classification tasks in spite of its simplicity. In this paper, we define two variants of the recommendation problem for the simple Bayesian classifier. In our approach, we calculate the similarity between users from negative ratings and positive ratings separately. We evaluated these algorithms using a database of movie recommendations and joke recommendations. Our empirical results show that one of our proposed Bayesian approaches significantly outperforms a correlation-based collaborative filtering algorithm. The other model almost out-performs as well although it shows similar performance to the correlation-based ap-proach in some parts of our experiments.Keywords:Agents, User modelingEmail address of contact author:miyahara@ (Until 3/31/00)miya@isl.melco.co.jp (After 4/1/00)Phone number of contact author:+1- (949) 824-8046 (Until 3/31/00)+81-(467) 41-2486 (After 4/1/00)1 IntroductionThe growth of Internet has resulted in a tremendous amount of information available and a vast array of choices for consumers. Recommender systems are designed to help a user cope with this situation by selecting a small number of options to present the user. They filter and recommend items based on a user’s preference model. Vari-ous types of recommender systems have been proposed so far, their filtering tech-niques fall into two categories. One is content-based filtering (e.g. [12]) and the other is collaborative filtering or social filtering (e.g. [16]).In content-based filtering, a user’s preference model is constructed for the individual based upon the user’s ratings and descriptions (usually, textual expression) of the rated items. Such systems try to find regularities in the descriptions that can be used to distinguish highly rated items from others. On the other hand, collaborative filter-ing tries to find desired items based on the preference of set of similar users. In order to find out like-minded users, it compares other users’ ratings with the target user’s ratings. It is not necessary to analyze the contents of items, therefore it can be applied to many kind of domains where a textual description is not available or regularities in the words used in the textual description are not informative (e.g. [4]). One of the most popular algorithms in collaborative filtering is a correlation-based approach. In this paper, we report experimental results comparing the collaborating filtering with the Simple Bayesian Classifier as an alternative approach.This paper is organized as follows. We present the central ideas of current typical collaborative filtering algorithms. We define the two alternative formulations of the Simple Bayesian Classifier for collaborative filtering. Then, we evaluate our algo-rithms on database of user ratings for movies and jokes, and show that our approach outperforms the correlation-based collaborative filtering algorithm. Finally, we dis-cuss the results and summarize this paper.2 Collaborative FilteringThe main idea of collaborative filtering is to recommend new items of interest for a particular user based on other users’ opinions. A variety of collaborative filtering al-gorithms have been reported and their performance has been evaluated empirically ([2], [15], [16]). These algorithms are based on a simple intuition: predictions for a user should be based on the preference patterns of other people who have similar in-terests. Therefore, the first step of these algorithms is to find similarities between user ratings. Resnick et al. [15] use the Pearson correlation coefficient as a measure of preference similarity . The correlation between user j and j’ is:∑∑∑−−−−=ij ij i j ij i j ij j ij jj R R R RR R R R w 2''2''')()())((where all summations over i are over the items which have been rated by both j and j’.The predicted value of user j for item i is computed as a weighted sum of other users’ratings:∑∑−+='''''')(ˆj jj j jj j ij j ij w w R R R R These correlation-based prediction schemes were shown to perform well. However, it should be valuable to think of other approaches. Breese et al. [2] report a variety of modification to the above typical collaborative filtering techniques and the use of Bayesian clustering and a Bayesian network. A primary difference between what we propose below and the work of Breese et al. [2] is that we construct a separate Baye-sian model for each user. This is practical only for the simple Bayesian classifier that is linear in the number of examples and number of features.3 Simple Bayesian Model3.1 Rating MatrixMost of collaborating filtering systems adopt numerical ratings and try to predict the exact numerical ratings. However, we are not interested in the prediction of the exact rating a user would have given to a target item. We would much rather like to have a system that can accurately distinguish between items to recommend and others.Therefore, we defined two classes, like and dislike, that were used as class labels.Table 1 is an example of rating matrix in which three users have reported ratings on five different items. Some entries in the matrix are empty because users do not rate every item. The last row represents the ratings of a user for which the system will make a prediction. Typically, the rating matrix is sparse because most users do not rate most items.I 1I 2I 3I 4I 5U 1Like Dislike Dislike Like U 2Dislike Dislike Dislike U 3Like Like Like Class LabelLike Dislike Like Like ?Table 1: Example of User Ratings in a sparse matrix I 1I 2I 3I 4I 5U 1like 10001U 1dislike 01100U 2like 00000U 2dislike 10011U 3like 01101U 3disike0000Class LabelLike Dislike Like Like ?Table 2. Boolean Feature transformation of Ratings MatrixBillsus and Pazzani [1] proposed transforming the format of rating matrix so that every cell has an entry. In their format, each user’s ratings are divided into two fea-tures, which has a Boolean value indicating whether the user reported liking the itemand whether the user reported not liking the item. Table 2 shows the resulting Boo-lean feature based rating matrix. One of the advantages of this transformation is that we can treat each feature as an attribute like a word in text-based information filtering domains. Therefore. it is possible to apply any supervised machine learning algorithm to the collaborative filtering task.3.2 Simple Bayesian ClassifierThe Simple Bayesian Classifier is one of the most successful algorithms on many classification domains. Despite of its simplicity, it is shown to be competitive with other complex approaches especially in text categorization and content based filter-ing. Making the “naïve” assumption that features are independent given the class la-bel, the probability of an item belonging to class j given its n feature values, p(class j| f1, f2, …f n) is proportional to:∏n ij ijclass fpclassp)|()(where both p(class j) and p(f i | class j) can be estimated from training data. To deter-mine the most likely class of an example, the probability of each class is computed, and the example is assigned to the class with the highest probability. Although the assumption that features are independent given class label of an item is not realistic in this domain, the Simple Bayesian Classifier has been shown to be optimal in many situations where this assumptions does not hold [3] and has been empirically been shown to be competitive with more complex approaches in many others (e.g., [9]).Here, we define two variants of the Simple Bayesian Classifier for collaborative fil-tering.(1) Transformed Data ModelThis model is identical to the multi-variate Bernoulli model applied to the trans-formed data such as that in Table 2. This model assumes that all the features, even dual features (U i like and U i dislike), are completely independent. After se-lecting a certain number of features, absent or present information of the selected features is used for predictions. That is:p(class j| f1=1, f2=0 , f3=1 …f n-1=1, f n=0)where f i=1 means that f i is present on the target item and f i=0 means that f i is ab-sent on the target item.When estimating conditional probabilities, e.g. p(f i =1| class j) , it is calculated over all ratings of the target user. The following conditions hold for this model: p(U i like = 1 | class j ) + p(U i like = 0 | class j ) = 1.p(U i dislike = 1 | class j ) + p(U i dislike = 0 | class j ) = 1.However, p(U i like = 1 | class j ) + p(U i dislike = 1 | class j ) and p(U i like = 0 | class j ) + p(U i dislike = 0 | class j ) does not necessarily equal 1 because some us-ers may have not indicated whether they like or dislike a particular item.(2) Sparse Data ModelIn this model, it is assumed that only known features are informative for classifi-cation. Therefore, only known features are used for predictions. Therefore the following formula is considered as follows:p(class j| f1=1, f3=1, …f n-1=1)Moreover, we make an only use of the data which both users in common rated when estimating conditional probabilities. In this representation, the following condition holds:p(U i like = 1 | class j ) + p(U i dislike = 1 | class j )=1For example, in the rating matrix of Table 2, the estimated conditional probability of p(U1like | like) = 0.33 in the transformed data model and p(U1like | like) = 0.5 in the sparse data model1 respectively.By using Simple Bayesian Classifier to make predictions, we expect to avoid a prob-lem with correlation-based collaborative filtering algorithms. The correlation-based algorithms make a global similarity model between users, rather than separate models for classes of ratings (e.g. positive rating vs. negative rating). It might be possible that a set of one user’s positive ratings is a good predictor for other users’positive ratings but the negative ratings of one user may not be useful in making predictions. Since the proposed models treat each class of ratings separately, we expect that the Baye-sian model will capture similarity between users more precisely.3.3 Feature SelectionFeature selection is a common preprocessing technique in many supervised learning algorithms. By restricting the number of features, it might be expected that it would increase the accuracy of the learner by ignoring irrelevant features or reduce the com-putation time. We apply a feature selection method to find a set of the n most infor-mative features. Since our goal is to discriminate between classes, we define informa-tive as being equivalent with providing the most information about an item’s class membership. Intuitively, we would like to select features that appear more frequently in one class than in others. We use an information theory based approach to determine n most informative features. This is accomplished by computing the expected infor-mation gain [13] that the presence or absence of a feature F gives toward the classifi-cation of a set of labeled items S:E(F, S) = I(S) - [p(F = 1) I(S F = 1) + p(F = 0) I(S F = 0)]where p(F =1) is the probability that feature F is present on an item, and S F = 1 is the set of items for which F = 1holds, and I(x) is the entropy of a set of labeled items, defined as:1We use Laplacean prior in the actual calculation of conditional probabilities to smooth the probability estimates with few rating and to avoid estimating a probability to be 0. Therefore, the values of p(U1like | like) are (1+1)/(3+2) = 0.4 in Transformed Data Model and (1+1)/(2+2) = 0.5 in Sparse Data Model respectively.∑∈−=classes cc cSpSpSI))((log)()(2where S c is the set of all rated items that belong to class c (In our case, c = {like, dis-like}) by the target user. This formula is suitable for the Transformed Model, because it can calculate information gain of all the features independently even dual features such as U i like and U i dislike. However the above formula doesn’t guarantee that se-lected feature is informative in the Sparse Model, because the conditional probability is estimated from the common items rated by both users. For Sparse Model, we ex-tend the above formula as follows:E sparse(F, S) = E(F,S common)*E(F,S)* E(¬F,S)where S common is the set of the common rated items by both users and ¬F is the dual feature of F, that is ¬U i like = U i dislike and ¬U i dislike = U i like. Note that since E(U i like, S common) is equal to E(U i dislike, S common), the value of E sparse(U i like, S) is equivalent to the value of E sparse(U i dislike, S) in the above formula. Accordingly, se-lecting features is identical to selecting users in the Sparse Model.4 Experiments4.1 DatasetWe used the EachMovie dataset and Jester dataset as test data.(1) EachMovie datasetThe EachMovie service was part of a research project at the DEC Systems Re-search Center [10]. The service was available for an 18-months period and was shut down in September 1997. During that time 72,916 users entered numeric ratings for 1,628 movies. User ratings were recorded on a numeric six-point scale, ranging from 0 to 1 (0, 0.2, 0.4, 0.6 0.8, 1.0). In our experiment, we use an experimental protocol similar to the one first used in [1]. We restricted the num-ber of users to first 2,000 users in the database. These 2,000 users provided rat-ings for 1,410 different movies.(2) Jester DataJester is a WWW-based joke recommendation system, which has been develop-ing at University of California, Berkeley [4]. This data has 21,800 users entered numeric ratings for 100 jokes. User ratings were recorded on a real value, ranging from -10 to +10. Like EachMovie dataset, we restricted the number of users to first 3,000 users in the database. These 3000 users provided rating for 100 differ-ent jokes.4.2 Evaluation CriteriaWe are not interested in the most accurate prediction of the exact rating which a user would have given to the target item. Rather we would like to have a system that can accurately distinguish items that are liked by the user and items disliked. To distin-guish items, we transformed numerical ratings into these two labels. We labeled items as like if the numerical rating for the item was above 0.7 (midpoint between the twopossible user ratings 0.6 and 0.8), or dislike otherwise in EachMovie dataset. And, we labeled items as like if the numerical rating for the item was above 2.0, or dislike oth-erwise in Jester dataset.Not only does assigning class labels allow us to measure classification accuracy, we can also apply additional performance measures, precision and recall, commonly used for information retrieval tasks. However, it might be easy to optimize each of these measurements. To avoid this problem, we use F-Measure [7], which combines precision and recall :recallprecison recall precision Measure F +⋅⋅=−24.3 Experimental MethodologyIn our first experiment, we have evaluated the effectiveness of feature selection for our proposed two alternative representations. We also have evaluated a typical corre-lation-based approach, which is described in [15]. We selected 20 test users who have rated at least 80 movies from the EachMovie and 20 test users who have rated at least 60 jokes from the Jester dataset respectively. In the correlation-based approach, after calculating the predicted score, we labeled like or dislike according to the thresholds (0.7 in EachMovie and 2.0 in Jester). For each test user we ran a total of 20 paired trials for each algorithm, where we varied the number of features. For an each trial in an experiment, we randomly selected 50 rated items for EachMovie and 40 for Jester as a training set, and 30 items for EachMovie and 20 for Jester as a test set. The final results for one user are then averaged over all 20 trials, and we report the average value over 20 test users. In the Transformed Model , we selected N most informative features from all of the features. Predictions are made using all of these selected fea-tures. However, since Sparse Model uses only present features, it would happen that no selected feature is present for the target items. To avoid this problem, we picked up N most informative users (features) among users have already rated the target item. We applied similar method to the correlation-based approach, except it used an absolute value of correlation coefficient instead of the expected information gain.In our second experiment, we have evaluated performance when we change the num-ber of rated item in a training data. We started training with 10 rated items and in-creased the training set incrementally in steps of 10 up to 50 items for EachMovie and up to 40 items for Jester, measuring the algorithms' performance on the test set for each training set size. For each algorithm, we set the number of features, which got the best performance at the first experiment. Like the first experiment, for each test user, we ran a total of 20 paired trials for each algorithm. We repeated this for all test users and the final results reported here are averaged over 20 test users.5 ResultsFigure 1 shows the classification accuracy of our first experiment with EachMovie dataset. Note that since there are 4,000 (2000 users × 2 features per user) features at most in EachMovie dataset, maximum number of features is 3,998 (4,000 features – 2features) in the Transformed Model . The results show that the Transformed Model reaches a maximum accuracy of 67.3% at 100 features. It seems to be sensitive to the number of selected features and it is getting worse in proportion to the number of features significantly. The Sparse Model reaches a maximum classification accuracy of 71.6% at 200 users. However, there are no significant differences among the per-formance with 30 user or more. Correlation reaches a maximum accuracy of 66.4% at 30 users. Its performance seems to be stable at 30 users or more like the Sparse Model .Figure 2 shows the classification accuracy with Jester dataset. The Transformed Model reaches a maximum classification accuracy of 68.3% at 200 features, Sparse Model is 68.5% at 50 users and Correlation is 68.0% at 50 users. Like EachMovie dataset, Transformed Model clearly has an optimal number of features. The perform-ance of Sparse Model and Correlation is getting worse when picking larger numberof users.58606264666850100200500100020003998Num ber of features A c c u r a c yClassfication Accuracy 646668707210203040501002001999Number of usersFigure 1: Effects of Feature Selection (EachMovie Dataset)626466687050100200300500100030005998Num ber of features A c c u r a c y626466687010203040501002005002999Number of usersFigure 2: Effects of Feature Selection (Jester Dataset)Figure 3 shows learning curves in our second experiment with EachMovie dataset,and Figure 4 shows learning curves with Jester dataset. For each model, we set the number of features which performs best in our first experiment. These results show that the Sparse Model performs best among three models. Especially, with Each-Movie dataset, it significantly outperforms other two models significantly (as for ac-curacy, at 50 training examples, 71.6% for Sparse Model vs. 67.3% for Transformed Model and 66.4% for Correlation . As for F-Measure, 70.2% for Sparse Model vs.64.4% Transformed Model and 58.4% for Correlation ). Transformed Model generally performs better than Correlation except the accuracy at 30 or less training examples.With Jester dataset, Sparse Model performs slightly better than the Transformed Model and both models outperform Correlation . At 40 training examples, Trans-formed Model reaches F-Measure of 66.3%, Sparse Model is 65.9% and Correlation is 60.1%. The accuracy of Sparse Model is 64.2%, Transformed Model is 62.7% andFigure 3: Learning Curves (EachMovie Dataset)61646770731020304050Number of Training ExamplesA c c u r a c y455055606570751020304050Figure 4: Learning Curves (Jester Dataset)6063666910203040A c c u r a c y45505560657010203040Number of Training ExamplesCorrelation is 61.7% at 10 training examples. As for the F-Measure, Sparse Model is 62.8%, Transformed Model is 60.0%, and Correlation is 45.6%.6 DiscussionOur experimental results show that our proposed collaborative filtering with the Sim-ple Bayesian Model performs well. The Sparse Model significantly outperforms over the correlation-based algorithm. We think that the probability calculation by dividing positive ratings and negative ratings separately captures more precise similarity be-tween users and it has a good effect on predictions. We also think that probability smoothing by Laplacean prior in the Sparse Model might be effective especially in the case that the number of commonly rated items is small.The feature selection is effective in the Transformed Model, the model has an opti-mum number of features which can work best. Similar results are reported in text classification tasks using the multi-variate Bernoulli model of Simple Bayesian Clas-sifier ([9], [12]). The Sparse Model has an optimum number of features with Jester dataset, but it is not significant. The effect of features selection is not clearly shown with EachMovie dataset.It is interesting that the Transformed Model works well. This model treats even miss-ing ratings as informative. It might be possible that this treatment distorts the simi-larity between users, because it would be happen that a user doesn’t rate items by chance. In text classification tasks, it is reasonable that an absent word is informative, because people tend to use suitable words for its domain of the text. Therefore, ab-sence of the word is a good predictor for its negative class. However, our empirical results show that this model performs well in spite of this intuitive thought. One ad-vantage of the Transformed Model is that it greatly reduces computational complex-ity. Once the model selected fixed number of features, it can make predictions using the selected features.7 Conclusions and Future WorkIn this paper, we reported on collaborative filtering with the Simple Bayesian Classi-fier. We proposed two representations for the Simple Bayesian Classifier. We found that the Sparse Data Model performs better than the Transformed Data Model and the typical correlation-based approach. This shows that the transformation proposed by Billsus and Pazzani [1] to use any machine learning algorithms for collaborative fil-tering may be improved upon by algorithms which handle missing data well. The Transformed Data Model also outperforms the correlation-based approach although it shows similar accuracy to the correlation approach in some parts of the experiment with EachMovie dataset. Since our experiments used two datasets, it is important to adopt other type of dataset to verify our methodology.In future work, we will investigate to combine content based filtering and collabora-tive filtering. As a first step, we plan to integrate keyword features and user features within one framework using the Simple Bayesian Classifier.References[1]Billsus, D. & Pazzani M. (1998) Learning Collaborative Filters. In Proceedingsof the 15th International Conference on Machine Learning, San Francisco, CA., Morgan Kaufmann Publishers.[2]Breese, J., Heckerman, D., Kadie, C. (1998) Empirical Analysis of PredictiveAlgorithms for Collaborative Filtering. In Proceedings of the 14th Conference on Uncertainty in Artificial Intelligence, Madison, WI., Morgan Kaufmann Pub-lisher.[3] Domingos, P. & Pazzani M.(1997) On the Optimality of the Simple BayesianClassifier under Zero-One Loss. Machine Learning, 29, 103-130.[4] Gupta, D., Digiovanni, M., Narita, H., Goldberg, K. (1999) Jester 2.0: A NewLinear-Time Collaborative Filtering Algorithm Applied to Jokes. Workshop on Recommender Systems Algorithms and Evaluation, 22nd International Confer-ence on Research and Development in Information Retrieval, Berkeley, CA. [5] Herlocker, J., Konstan, J., Borchers, A., Riedl, J. (1999) An Algorithmic Frame-work for Performing Collaborative Filtering. In proceedings of 22nd International Conference on Research and Development in Information Retrieval 230-237, Berkley, CA., ACM Press.[6]Hill, W., Stead, L., Rosenstein, M., Furnas, G.(1995) Recommending and Evalu-ating Choices in a Virtual Community of Use. In Proceedings of the Conference on Human Factors in Computing Systems, 194-201, Denver, CO., ACM Press. [7]Lewis, D. & Gale, W. A. (1994) A sequential algorithm for training text classifi-ers. In Proceedings of 17th International Conference on Research and Develop-ment in Information Retrieval, 3-12, London, Springer-Verlag.[8]Lewis, D. (1998) Naïve (Bayes) at forty: The independence assumption in infor-mation retrieval. In Proceedings of the Tenth European Conference on Machine Learning.[9]McCallum, A. & Nigam, K. (1998) A Comparison of Event Models for NaïveBayes Text Classification. American Association for Artificial Intelligence (AAAI) Workshop on Learning for Text Categorization.[10]McJonese, P. (1997). EachMovie collaborative filtering data set. DEC SystemsResearch Center.[11]Mitchell, T., (1997) Machine Learning. MacGraw-Hill, New York.[12]Pazzani, M. & Billsus, D. (1997) Learning and Revising User Profiles: The iden-tification of interesting web sites. Machine Learning 27, 313-331.[13]Quinlan, J.R. (1986). Induction of decision trees. Machine Learning 1, 81-106.[14]Resnick, P. & Varian, H. (1997) Recommender systems. Communications of theACM, 40(3) 56-58.[15]Resnick, P., Neophytos, I., Mitesh, S. Bergstrom, P. Riedl, J. (1994) GroupLens:An Open Architecture for Collaborative Filtering of Netnews. In Proceedings of CSCW94: Conference on Computer Supported Cooperative Work, 175-186, Chapel Hill, Addison-Wesley.[16]Shardanand, U. & Maes, P. (1995) Social Information Filtering: Algorithms forAutomating 'Word of Mouth'. In Proceedings of the Conference on Human Fac-tors in Computing Systems, 210-217, Denver, CO., ACM Press.。

脑功能成像数据前处理方法改进

脑功能成像数据前处理方法改进

脑功能成像数据前处理方法改进脑功能成像是一种非侵入性的技术,可用于研究人类大脑的活动和功能。

随着脑科学的发展,脑功能成像数据的分析方法不断改进,以提高数据质量和信息提取的效果。

其中,脑功能成像数据前处理方法的改进对于后续分析的可靠性和准确性至关重要。

本文将讨论当前脑功能成像数据前处理方法的问题,并提出改进方法。

当前脑功能成像数据前处理方法主要包括去噪、去伪迹、对齐和标准化等步骤。

然而,这些方法仍存在一些问题需要解决。

首先,噪声是脑功能成像数据中常见的干扰源。

传统的去噪方法如高斯滤波和小波去噪等在一定程度上能减少噪声的影响,但对信号的损失较大。

因此,如何在减少噪声的同时保留原始信号的细节信息成为一个挑战。

其次,脑功能成像数据前处理中的去伪迹步骤用于消除由于呼吸、脉搏等产生的干扰效应。

目前的方法主要基于统计模型,如伪迹回归和时间延迟估计等。

然而,这些方法通常只能消除部分伪迹,而对于较强的伪迹仍然无法很好地处理。

因此,需要寻找更精确和稳健的去伪迹方法,以提高数据的准确性。

此外,数据对齐和标准化是脑功能成像数据前处理中的重要步骤。

对齐将不同时间点或不同被试者的数据映射到统一的空间中,以便进行后续的分析。

标准化则将数据转换为与参考模板一致的形式,以减少个体差异的影响。

然而,传统的对齐和标准化方法常常存在误差和不一致性,导致结果的可靠性受到限制。

因此,如何提高对齐和标准化的精度和稳定性是一个重要的研究方向。

针对以上问题,可以考虑以下改进方法。

首先,在去噪方面,可以利用稀疏表示方法,如字典学习和稀疏编码等。

这些方法能够在尽量保留原始信号细节的同时,去除噪声的干扰。

此外,还可以尝试应用深度学习和卷积神经网络等方法进行噪声的建模和去除,以提高去噪的效果。

对于去伪迹问题,可以考虑使用机器学习的方法,如支持向量机和随机森林等。

这些方法能够通过学习数据之间的关系,提取出伪迹的特征并进行分类和去除。

此外,可以结合多模态数据的信息,以提高伪迹去除的准确性。

基于智能电网的电力系统优化调度算法研究

基于智能电网的电力系统优化调度算法研究

设计应用技术基于智能电网的电力系统优化调度算法研究夏书悦1,孙放2国网江苏省电力有限公司高邮市供电分公司,江苏国网江苏省电力有限公司连云港供电分公司,江苏传统电力系统面临一系列挑战,如电力供求平衡困难、能源利用率低、调度效率低等。

随着智能电网的可持续发展方向转变。

电力系统优化需运用智能电网的数据采集、智能分析等新型手段,在实时监测和控制电网运行的过程中,实现优化调度和资源协同利用,提高能源利用效率和电力系统运行的可靠性与稳定性。

研究基于智能电网的电力系统优化调度算法,通过对电力系统的优化调度,提高电力系统的运行效率和可靠性。

采用综合考虑供需平衡、经济性和环境影响的优化调度算法,通过模拟实验对其进行验证。

结果表明,该算法能够有效降低电力系统的运行成本,实现电力系统的供需平衡。

智能电网;电力系统;优化调度算法Research on Optimal Dispatching Algorithm of Power System Based on Smart GridXIA Shuyue1, SUN Fang.Gaoyou Power Supply Branch of State Grid Jiangsu Electric Power Co., Ltd., Gaoyou.State Grid Jiangsu Electric Power Co., Ltd., Lianyungang Power Supply Branch, Lianyungang实时监测和预测负荷需求,准确把握负荷波动性[2]。

制定灵活的发电机组调度策略,包括启停控制、快速调整功率输出等,以适应负荷的变化。

智能电网技术13:00对于已经运行的发电机组,可以通过调整其功率输出来适应负荷的变化。

若负荷需求增加量为,则启动的总功率输标函数的结果,以满足所有地区的电力需求。

根据各地区的电力需求和供应情况,进行跨区域电力资源的优化配置和互联互通,引入新能源接入机制,鼓励可再生能源的发展和利用,并与传统能源进行协同运行,实现优化地能源供应结构,提高发电机组的效率和灵活性。

NeuralCollaborativeFiltering神经网络协同过滤

NeuralCollaborativeFiltering神经网络协同过滤

NeuralCollaborativeFiltering神经⽹络协同过滤⼀、MF协同过滤的局限性The innerproduct, which simply combines the multiplication of latent features linearly, may not be sufficient to capture the com p lex structure of user interaction data.简单地将潜在特征的乘积线性组合的内积可能不⾜以捕捉⽤户交互数据的复杂结构。

捕获不到更⾼阶的信息,本质上还是建模⽅式⽐较单⼀。

我们⾸先关注的图 1(a) 中的前三⾏(⽤户)。

很容易可以计算出s23(0.66)>s12(0.5)>s13(0.4) 。

这样,p1,p2 和p3 在潜在空间中的⼏何关系可绘制成图1(b)。

现在,让我们考虑⼀个新的⽤户u4,它的输⼊在图1(a)中的⽤虚线框出。

我们同样可以计算出s41(0.6)>s43(0.4)>s42(0.2) ,表⽰u4 最接近u1,接着是u3 ,最后是u2 。

然⽽,如果MF模型将p4 放在了最接近p1 的位置(图1(b) 中的虚线展⽰了两种不同的摆放p4的⽅式,结果⼀样),那么会使得p4 相⽐与p3 更接近于p2 (显然,根据图1(a),u4 应该更接近u3,这会导致很⼤的排名误差(ranking loss)。

上⾯的⽰例显⽰了MF因为使⽤⼀个简单的和固定的内积,来估计在低维潜在空间中⽤户-项⽬的复杂交互,从⽽所可能造成的限制。

我们注意到,解决该问题的⽅法之⼀是使⽤⼤量的潜在因⼦ K (就是潜在空间向量的维度)。

然⽽这可能对模型的泛化能⼒产⽣不利的影响(e.g. 数据的过拟合问题),特别是在稀疏的集合上。

在论⽂的⼯作中,通过使⽤DNNs从数据中学习交互函数,突破了这个限制。

⼆、NCF的实现输⼊层:两个特征向量:⽤户特性向量v U u和项⽬特征向量v I i,one-hot编码的⼆值化稀疏向量嵌⼊层:输⼊层稀疏向量映射为稠密向量。

协同过滤算法英语作文

协同过滤算法英语作文

协同过滤算法英语作文Title: The Application and Advancements of Collaborative Filtering Algorithm。

Collaborative filtering algorithm, a cornerstone in the field of recommender systems, has garnered widespread attention for its ability to predict user preferences and provide personalized recommendations. In recent years, with the exponential growth of online platforms and the increasing volume of data generated by users, collaborative filtering algorithms have become indispensable tools for businesses seeking to enhance user experience and drive engagement. This essay explores the principles, applications, and advancements of collaborative filtering algorithms, shedding light on their significance in today's digital landscape.At its core, collaborative filtering relies on the principle of leveraging collective user behavior to make predictions about the interests of individual users. Byanalyzing user interactions, such as ratings, purchases, and preferences, collaborative filtering algorithmsidentify patterns and similarities among users to generate recommendations. There are two main approaches to collaborative filtering: memory-based and model-based.Memory-based collaborative filtering, also known as neighborhood-based collaborative filtering, operates by calculating similarities between users or items based on their historical interactions. One of the most widely used techniques in this approach is cosine similarity, which measures the cosine of the angle between two vectors representing user preferences. By identifying users with similar preferences, memory-based collaborative filtering generates recommendations based on items liked or purchased by similar users.On the other hand, model-based collaborative filtering involves building a mathematical model based on the user-item interaction data. Techniques such as matrix factorization and singular value decomposition (SVD) are commonly employed to decompose the user-item matrix intolatent factors representing user preferences and item characteristics. By learning these latent factors, model-based collaborative filtering can make accurate predictions even in the presence of sparse data.The applications of collaborative filtering algorithms are manifold, spanning across various industries including e-commerce, media streaming, social networking, and more.E-commerce platforms utilize collaborative filtering to recommend products based on the browsing and purchasing history of users, thereby increasing sales and customer satisfaction. Similarly, media streaming services leverage collaborative filtering to suggest movies, TV shows, or music based on users' past viewing or listening behavior, enhancing user engagement and retention.Furthermore, social networking platforms employ collaborative filtering to recommend friends, groups, or content tailored to the interests and preferences of users. By analyzing the social graph and user interactions, these platforms can foster connections and facilitate content discovery, thereby enriching the user experience.Additionally, collaborative filtering algorithms are usedin content-based filtering and hybrid recommender systems, combining multiple approaches to generate more accurate and diverse recommendations.Despite its effectiveness, collaborative filtering algorithms are not without limitations. One of the primary challenges is the cold start problem, which occurs when new users or items have limited interaction data, making it difficult to generate accurate recommendations. To address this issue, techniques such as demographic filtering, content-based filtering, and hybrid approaches are employed to supplement collaborative filtering and improve recommendation quality.Moreover, collaborative filtering algorithms may suffer from the problem of popularity bias, wherein popular items tend to receive more recommendations, leading to a lack of diversity in recommendations. To mitigate this bias, techniques such as diversity-aware recommendation and serendipity enhancement are employed to ensure that users are exposed to a variety of items across differentcategories.In recent years, significant advancements have been made in collaborative filtering research, driven by innovations in machine learning, deep learning, and data mining techniques. Deep learning models, such as neural collaborative filtering (NCF) and recurrent neural networks (RNNs), have shown promising results in capturing complex patterns and dependencies in user-item interactions, thereby improving recommendation accuracy and scalability.Furthermore, the integration of contextual information, such as temporal dynamics, location-based factors, and social influence, has enhanced the capabilities of collaborative filtering algorithms to provide context-aware recommendations. By considering contextual factors, such as time of day, user location, or social connections, collaborative filtering algorithms can adapt recommendations to better suit the preferences and situational needs of users.In conclusion, collaborative filtering algorithms playa crucial role in the era of big data and personalized recommendation systems. By harnessing the collective wisdom of users, collaborative filtering enables businesses to deliver tailored recommendations that enhance user experience, drive engagement, and foster loyalty. With ongoing research and advancements in machine learning and data science, collaborative filtering algorithms are poised to remain at the forefront of recommender systems, shaping the future of digital commerce and content consumption.。

改进的协同过滤推荐算法

改进的协同过滤推荐算法

改进的协同过滤推荐算法刘芳先;宋顺林【期刊名称】《计算机工程与应用》【年(卷),期】2011(047)008【摘要】Collaborative filtering is the most widely used and the most successful technology in the personalized recommendation system so far. However, existing collaborative filtering algorithms have taken the user's interests in different time into equal consideration,which leads to the lack of effectiveness in the given period of time. At the same time,they have been suffeting from low recommendation accuracy. Based on two crucial steps:Computing the user's nearest neighbor and predicting item ratings, this paper proposes an improved collaborative filtering algorithm,which computes user similarity based on the relation between items and adds time weight for computing item ratings,to get more appropriate neighbors and make the click interests approaching the gathering time have bigger weight in recommendation process. Experimental results show that the improved algorithm can provide up to date recommendations and give better prediction in accuracy.%协同过滤是适今为止个性化推荐系统中采用最广泛最成功的推荐技术,但现有方法是将用户不同时间的兴趣等同考虑,时效性不足,而且推荐精度也有待进一步提高.鉴于此提出一种改进的协同过滤算法,针对用户近邻计算和项目评分的预测两个关键步骤,提出基于项目相关性的用户相似性计算方法,以便邻居用户更准确,同时在预测评分的过程中增加时间权限,使得接近采集时间的点击兴趣在推荐过程中具有更大权值.实验结果表明,该算法在提高了推荐精度的同时实现了实时推荐.【总页数】4页(P72-75)【作者】刘芳先;宋顺林【作者单位】江苏大学计算机学院,江苏,镇江,212013;江苏大学计算机学院,江苏,镇江,212013【正文语种】中文【中图分类】TP311【相关文献】1.一种改进的协同过滤推荐算法 [J], 李瑶2.基于改进的协同过滤图书推荐算法 [J], 唐高芳3.用户协同过滤个性化图书推荐算法的改进与实现 [J], 刘军军4.针对修正余弦相似度改进的协同过滤推荐算法 [J], 褚宏林;刘其成;牟春晓5.基于改进聚类与融合用户属性特征的协同过滤推荐算法 [J], 王汇琳;陈欣因版权原因,仅展示原文概要,查看原文内容请购买。

增强采样方法 计算化学公社

增强采样方法 计算化学公社

增强采样方法计算化学公社下载温馨提示:该文档是我店铺精心编制而成,希望大家下载以后,能够帮助大家解决实际的问题。

文档下载后可定制随意修改,请根据实际需要进行相应的调整和使用,谢谢!本店铺为大家提供各种各样类型的实用资料,如教育随笔、日记赏析、句子摘抄、古诗大全、经典美文、话题作文、工作总结、词语解析、文案摘录、其他资料等等,如想了解不同资料格式和写法,敬请关注!Download tips: This document is carefully compiled by the editor. I hope that after you download them, they can help you solve practical problems. The document can be customized and modified after downloading, please adjust and use it according to actual needs, thank you!In addition, our shop provides you with various types of practical materials, such as educational essays, diary appreciation, sentence excerpts, ancient poems, classic articles, topic composition, work summary, word parsing, copy excerpts, other materials and so on, want to know different data formats and writing methods, please pay attention!增强采样方法在计算化学领域中扮演着至关重要的角色,它是一种通过提高采样频率和效率来改善模拟系统的方法。

CollaborativeFiltering(协同过滤)算法详解

CollaborativeFiltering(协同过滤)算法详解

CollaborativeFiltering(协同过滤)算法详解基本思想基于⽤户的协同过滤算法是通过⽤户的历史⾏为数据发现⽤户对商品或内容的喜欢(如商品购买,收藏,内容评论或分享),并对这些喜好进⾏度量和打分。

根据不同⽤户对相同商品或内容的态度和偏好程度计算⽤户之间的关系。

在有相同喜好的⽤户间进⾏商品推荐。

简单的说就是如果A,B两个⽤户都购买了x、y、z三本图书,并且给出了5星的好评。

那么A和B就属于同⼀类⽤户。

可以将A看过的图书w也推荐给⽤户B。

基于⽤户协同过滤算法的原理图所以,协同过滤算法主要分为两个步骤:1、寻找相似的⽤户集合;2、寻找集合中⽤户喜欢的且⽬标⽤户没有的进⾏推荐。

具体实现⼀、寻找⽤户间的相似度1、Jaccard公式Jaccard系数主要⽤于计算符号度量或布尔值度量的个体间的相似度,因为个体的特征属性都是由符号度量或者布尔值标识,因此⽆法衡量差异具体值的⼤⼩,只能获得“是否相同”这个结果,所以Jaccard系数只关⼼个体间共同具有的特征是否⼀致这个问题。

如果⽐较X与Y的Jaccard相似系数,只⽐较xn和yn中相同的个数。

Jaccard公式2、⽪尔逊相关系数⽪尔逊相关系统是⽐欧⼏⾥德距离更加复杂的可以判断⼈们兴趣相似度的⼀种⽅法。

它在数据不是很规范时,会倾向于给出更好的结果。

假定有两个变量X、Y,那么两变量间的⽪尔逊相关系数可通过以下公式计算:公式⼀:⽪尔逊相关系数公式⼀公式⼆:⽪尔逊相关系数公式⼆公式三:⽪尔逊相关系数公式三公式四:⽪尔逊相关系数公式四上述四个公式等价,其中E是数学期望,cov表⽰协⽅差,N表⽰变量取值的个数。

3、欧⼏⾥德距离假定两个⽤户X、Y,均为n维向量,表⽰⽤户对n个商品的评分,那么X与Y的欧⼏⾥德距离就是:多维欧⼏⾥德距离公式数值越⼩则代表相似度越⾼,但是对于不同的n,计算出来的距离不便于控制,所以需要进⾏如下转换:相似度公式使得结果分布在(0,1]上,数值越⼤,相似度越⾼。

协同过滤算法python代码

协同过滤算法python代码

协同过滤算法python代码协同过滤算法(collaborative filtering)是一种基于用户历史行为进行推荐的算法。

下面是一个简单的基于用户的协同过滤算法实现,代码是用 Python 编写的。

数据处理假设我们有一个用户评分矩阵,其中行代表用户,列代表电影,每个单元格中的值是用户对电影的评分(或者没有评分,用0来表示),如下所示:users_movies = [[2, 3, 4, 5, 0],[0, 2, 3, 0, 4],[3, 0, 0, 5, 0],[0, 0, 3, 4, 5],[2, 3, 0, 5, 0],]我们需要对这个数据进行预处理,将每个用户的评分标准化(减去均值):import numpy as npdef preprocess_ratings(R):m, n = R.shaperatings = np.zeros((m, n))for i in range(m):average_rating = np.mean(R[i, :][R[i, :] > 0])ratings[i, :] = R[i, :] - average_ratingreturn ratingsratings = preprocess_ratings(np.array(users_movies))相似度计算接下来,我们需要计算用户之间的相似度。

这里使用余弦相似度(cosine similarity):def cosine_similarity(u, v):return np.dot(u, v) / (np.linalg.norm(u) * np.linalg.norm(v))预测评分既然我们已经计算出了用户之间的相似度,我们可以使用这些数据来预测用户还没有评价过的电影的评分。

这里使用加权加和的方法来计算预测评分,加权因子是相似度:def predict_rating(user_id, movie_id, ratings, similarities, k):m, n = ratings.shape# 找到用户给其他电影的评分rated_movies = [i for i in range(n) if ratings[user_id, i] > 0]# 找到 k 个相似用户similarities[user_id, user_id] = 0similar_users = np.argsort(similarities[user_id, :])[::-1][:k]# 计算预测评分numerator = sum([similarities[user_id, i] * ratings[i, movie_id]for i in similar_users])denominator = sum([abs(similarities[user_id, i])for i in similar_users])if denominator == 0:return 0else:return numerator / denominator现在,我们可以使用 predict_rating 函数来为用户预测评分。

一种缓解协同过滤算法数据稀疏性的方法

一种缓解协同过滤算法数据稀疏性的方法

一种缓解协同过滤算法数据稀疏性的方法蔡雄峰;艾丽华;丁丁【期刊名称】《软件》【年(卷),期】2015(036)003【摘要】The Collaborative Filtering Algorithm is one of the most ancient algorithm in recommendation system.At the same time,with the simpilicity and high efficiency,the collaborative filtering algorithm has encountered data spar-sity and cold starts problems.In this article,against the issue in data sparsity,we propose a method based on interes-tingness to predict the unrated scores by users.At the end of the ariticle,we made experiments based on Netflix dataset,and indicates that the method could better process the sparse matrix,and relieve the issue in data sparsity,and enhence improve the accuracy of collaborative filtering algorithm.%协同过滤算法是推荐系统中最古老的算法之一,同时也是当今推荐系统中使用最广泛的一种算法.但是在简单,效率高的同时,协同过滤算法还存在数据稀疏性,冷启动等一些问题.本文针对其数据稀疏性的问题,提出了一种根据兴趣度预测用户未评分项目的方法.最后通过基于Netflix数据集的实验结果表明,该方法能够更好的处理稀疏矩阵,能缓解数据稀疏问题,从而提高了协同过滤算法的准确性.【总页数】7页(P41-47)【作者】蔡雄峰;艾丽华;丁丁【作者单位】北京交通大学计算机与信息技术学院,北京 100044;北京交通大学计算机与信息技术学院,北京 100044;北京交通大学计算机与信息技术学院,北京100044【正文语种】中文【中图分类】TP391.1【相关文献】1.一种有效缓解数据稀疏性的混合协同过滤算法 [J], 郁雪;李敏强2.分步填充缓解数据稀疏性的协同过滤算法 [J], 张玉芳;代金龙;熊忠阳3.一种缓解互惠推荐系统中数据稀疏性的算法 [J], 殷方勇;王红;王吉华4.一种解决协同过滤数据稀疏性问题的方法 [J], 王洋;骆力明5.缓解数据稀疏性问题的传统技术研究综述 [J], 陈金晨因版权原因,仅展示原文概要,查看原文内容请购买。

Collaborative

Collaborative

Collaborative filteringCollaborative filtering,即协同过滤,是⼀种新颖的技术。

最早于1989年就提出来了,直到21世纪才得到产业性的应⽤。

应⽤上的代表在国外有,Last.fm,Digg等等。

最近由于毕业论⽂的原因,开始研究这个题⽬,看了⼀个多星期的论⽂与相关资料之后,决定写篇总结来总结⼀下最近这段时间资料收集的成果。

在微软1998年的那篇关于协同过滤的论⽂[1]中,将协同过滤分成了两个流派,⼀个是Memory-Based,⼀个是Model-Based。

关于Memory-Based的算法,就是利⽤⽤户在系统中的操作记录来⽣成相关的推荐结果的⼀种⽅法,主要也分成两种⽅法,⼀种是User-Based,即是利⽤⽤户与⽤户之间的相似性,⽣成最近的邻居,当需要推荐的时候,从最近的邻居中得到推荐得分最⾼的⼏篇⽂章,⽤作推荐;另外⼀种是Item-Based,即是基于item之间的关系,针对item来作推荐,即是使⽤这种⽅法,使⽤⼀种基本的⽅法来得到不俗的效果。

⽽实验结果也表明,Item-Based的做法⽐User-Based更有效[2]。

⽽对于Model-Based的算法,即是使⽤机器学习中的⼀些建模算法,在线下对于模型进⾏预计算,在线上能够快速得出结果。

主要使⽤的算法有 Bayesian belief nets , clustering , latent semantic , 最近⼏年⼜出现了使⽤SVM 等的CF算法。

最近⼏年⼜提出⼀种新的分类,content-based,即是对于item的内容进⾏分析,从⽽进⾏推荐。

⽽现阶段,⽐较优秀的⼀些应⽤算法,则是将以上⼏种⽅法,混合使⽤。

⽐较说Google News[3],在它的系统中,使⽤了⼀种将Memory-Based与Model-Based两种⽅法混合的算法来处理。

在Google的那篇论⽂⾥⾯,它提到了如何构建⼀个⼤型的推荐系统,其中Google的⼀些⾼效的基础架构如:BigTable,MapReduce等得到很好的应⽤。

【推荐系统】neural_collaborative_filtering(源码解析)

【推荐系统】neural_collaborative_filtering(源码解析)

【推荐系统】neural_collaborative_filtering(源码解析)很久没看推荐系统相关的论⽂了,最近发现⼀篇2017年的论⽂,感觉不错。

项⽬的主题框架如下:代码是使⽤keras来实现的深度学习,其中GMF.py是传统的Matrix Factorization算法,关键代码分为两部分:def get_model(num_users, num_items, latent_dim, regs=[0,0]):# Input variablesuser_input = Input(shape=(1,), dtype='int32', name = 'user_input')item_input = Input(shape=(1,), dtype='int32', name = 'item_input')MF_Embedding_User = Embedding(input_dim = num_users, output_dim = latent_dim, name = 'user_embedding',init = init_normal, W_regularizer = l2(regs[0]), input_length=1)MF_Embedding_Item = Embedding(input_dim = num_items, output_dim = latent_dim, name = 'item_embedding',init = init_normal, W_regularizer = l2(regs[1]), input_length=1)# Crucial to flatten an embedding vector!user_latent = Flatten()(MF_Embedding_User(user_input))item_latent = Flatten()(MF_Embedding_Item(item_input))# Element-wise product of user and item embeddingspredict_vector = merge([user_latent, item_latent], mode = 'mul')# Final prediction layer#prediction = Lambda(lambda x: K.sigmoid(K.sum(x)), output_shape=(1,))(predict_vector)prediction = Dense(1, activation='sigmoid', init='lecun_uniform', name = 'prediction')(predict_vector)model = Model(input=[user_input, item_input],output=prediction)return model上述代码是构建模型结构,⾸先定义Input为⼀维多列的数据,然后是Embedding层,Embedding主要是为了降维,就是起到了look up的作⽤,然后是Merge层,将⽤户和物品的张量进⾏了内积相乘(latent_dim 表⽰两者的潜在降维的维度是相同的,因此可以做内积),紧接着是⼀个全连接层,激活函数为sigmoid。

Toward the Next Generation of Recommender Systems A Survey of the State-of-the-Art and Possible Exte

Toward the Next Generation of Recommender Systems A Survey of the State-of-the-Art and Possible Exte

Toward the Next Generation of Recommender Systems:A Survey of the State-of-the-Art andPossible ExtensionsGediminas Adomavicius,Member,IEEE,and Alexander Tuzhilin,Member,IEEE Abstract—This paper presents an overview of the field of recommender systems and describes the current generation ofrecommendation methods that are usually classified into the following three main categories:content-based,collaborative,and hybrid recommendation approaches.This paper also describes various limitations of current recommendation methods and discussespossible extensions that can improve recommendation capabilities and make recommender systems applicable to an even broader range of applications.These extensions include,among others,an improvement of understanding of users and items,incorporation of the contextual information into the recommendation process,support for multcriteria ratings,and a provision of more flexible and less intrusive types of recommendations.Index Terms—Recommender systems,collaborative filtering,rating estimation methods,extensions to recommender systems.æ1I NTRODUCTIONR ECOMMENDER systems have become an important research area since the appearance of the first papers on collaborative filtering in the mid-1990s[45],[86],[97]. There has been much work done both in the industry and academia on developing new approaches to recommender systems over the last decade.The interest in this area still remains high because it constitutes a problem-rich research area and because of the abundance of practical applications that help users to deal with information overload and provide personalized recommendations, content,and services to them.Examples of such applica-tions include recommending books,CDs,and other products at [61],movies by MovieLens [67],and news at VERSIFI Technologies(formerly )[14].Moreover,some of the vendors have incorporated recommendation capabilities into their commerce servers[78].However,despite all of these advances,the current generation of recommender systems still requires further improvements to make recommendation methods more effective and applicable to an even broader range of real-life applications,including recommending vacations,certain types of financial services to investors,and products to purchase in a store made by a“smart”shopping cart[106]. These improvements include better methods for represent-ing user behavior and the information about the items to be recommended,more advanced recommendation modeling methods,incorporation of various contextual information into the recommendation process,utilization of multcriteria ratings,development of less intrusive and more flexible recommendation methods that also rely on the measures that more effectively determine performance of recommen-der systems.In this paper,we describe various ways to extend the capabilities of recommender systems.However,before doing this,we first present a comprehensive survey of the state-of-the-art in recommender systems in Section2.Then, we identify various limitations of the current generation of recommendation methods and discuss some initial ap-proaches to extending their capabilities in Section3.2T HE S URVEY OF R ECOMMENDER S YSTEMS Although the roots of recommender systems can be traced back to the extensive work in cognitive science[87], approximation theory[81],information retrieval[89], forecasting theories[6],and also have links to management science[71]and to consumer choice modeling in marketing [60],recommender systems emerged as an independent research area in the mid-1990s when researchers started focusing on recommendation problems that explicitly rely on the ratings structure.In its most common formulation, the recommendation problem is reduced to the problem of estimating ratings for the items that have not been seen by a user.Intuitively,this estimation is usually based on the ratings given by this user to other items and on some other information that will be formally described below.Once we can estimate ratings for the yet unrated items,we can recommend to the user the item(s)with the highest estimated rating(s).More formally,the recommendation problem can be formulated as follows:Let C be the set of all users and let S be the set of all possible items that can be recommended, such as books,movies,or restaurants.The space S of.G.Adomavicius is with the Carlson School of Management,University ofMinnesota,32119th Avenue South,Minneapolis,MN55455.E-mail:gedas@.. A.Tuzhilin is with the Stern School of Business,New York University,44West4th Street,New York,NY10012.E-mail:atuzhili@.Manuscript received8Mar.2004;revised14Oct.2004;accepted10Dec.2004;published online20Apr.2005.For information on obtaining reprints of this article,please send e-mail to:tkde@,and reference IEEECS Log Number TKDE-0071-0304.1041-4347/05/$20.00ß2005IEEE Published by the IEEE Computer Societypossible items can be very large,ranging in hundreds of thousands or even millions of items in some applications,such as recommending books or CDs.Similarly,the user space can also be very large—millions in some cases.Let u be a utility function that measures the usefulness of item s to user c ,i.e.,u :C ÂS !R ,where R is a totally ordered set (e.g.,nonnegative integers or real numbers within a certain range).Then,for each user c 2C ,we want to choose such item s 02S that maximizes the user’s utility.More formally:8c 2C;s 0c ¼arg max s 2Su ðc;s Þ:ð1ÞIn recommender systems,the utility of an item is usually represented by a rating ,which indicates how a particular user liked a particular item,e.g.,John Doe gave the movie “Harry Potter”the rating of 7(out of 10).However,as indicated earlier,in general,utility can be an arbitrary function,including a profit function.Depending on the application,utility u can either be specified by the user,as is often done for the user-defined ratings,or is computed by the application,as can be the case for a profit-based utility function.Each element of the user space C can be defined with a profile that includes various user characteristics,such as age,gender,income,marital status,etc.In the simplest case,the profile can contain only a single (unique)element,such as User ID.Similarly,each element of the item space S is defined with a set of characteristics.For example,in a movie recommendation application,where S is a collection of movies,each movie can be represented not only by its ID,but also by its title,genre,director,year of release,leading actors,etc.The central problem of recommender systems lies in that utility u is usually not defined on the whole C ÂS space,but only on some subset of it.This means u needs to be extrapolated to the whole space C ÂS .In recommender systems,utility is typically represented by ratings and is initially defined only on the items previously rated by the users.For example,in a movie recommendation application (such as the one at ),users initially rate some subset of movies that they have already seen.An example of a user-item rating matrix for a movie recommendation application is presented in Table 1,where ratings are specified on the scale of 1to 5.The “ ”symbol for some of the ratings in Table 1means that the users have not rated the corresponding movies.Therefore,the recommendation engine should be able to estimate (predict)the ratings of the nonrated movie/user combinations and issue appropriate recommendations based on these predictions.Extrapolations from known to unknown ratings are usually done by 1)specifying heuristics that define the utility function and empirically validating its performanceand 2)estimating the utility function that optimizes certain performance criterion,such as the mean square error.Once the unknown ratings are estimated,actual recommendations of an item to a user are made by selecting the highest rating among all the estimated ratings for that user,according to (1).Alternatively,we can recommend the N best items to a user or a set of users to an item.The new ratings of the not-yet-rated items can be estimated in many different ways using methods from machine learning,approximation theory,and various heuristics.Recommender systems are usually classified according to their approach to rating estimation and,in the next section,we will present such a classification that was proposed in the literature and will provide a survey of different types of recommender systems.The commonly accepted formulation of the recommendation problem was first stated in [45],[86],[97]and this problem has been studied extensively since then.Moreover,recommender systems are usually classified into the following categories,based on how recommendations are made [8]:.Content-based recommendations :The user will be recommended items similar to the ones the user preferred in the past;.Collaborative recommendations :The user will berecommended items that people with similar tastes and preferences liked in the past;.Hybrid approaches :These methods combine colla-borative and content-based methods.In addition to recommender systems that predict the absolute values of ratings that individual users would give to the yet unseen items (as discussed above),there has been work done on preference-based filtering ,i.e.,predicting the relative preferences of users [22],[35],[51],[52].For example,in a movie recommendation application,prefer-ence-based filtering techniques would focus on predicting the correct relative order of the movies,rather than their individual ratings.However,this paper focuses primarily on rating-based recommenders since it constitutes the most popular approach to recommender systems.2.1Content-Based MethodsIn content-based recommendation methods,the utility u ðc;s Þof item s for user c is estimated based on the utilities u ðc;s i Þassigned by user c to items s i 2S that are “similar”to item s .For example,in a movie recommendation application,in order to recommend movies to user c ,the content-based recommender system tries to understand the commonalities among the movies user c has rated highly in the past (specific actors,directors,genres,subject matter,TABLE 1A Fragment of a Rating Matrix for a Movie Recommender Systemetc.).Then,only the movies that have a high degree of similarity to whatever the user’s preferences are would be recommended.The content-based approach to recommendation has its roots in information retrieval[7],[89]and information filtering[10]research.Because of the significant and early advancements made by the information retrieval and filtering communities and because of the importance of several text-based applications,many current content-based systems focus on recommending items containing textual information,such as documents,Web sites(URLs),and Usenet news messages.The improvement over the tradi-tional information retrieval approaches comes from the use of user profiles that contain information about users’tastes, preferences,and needs.The profiling information can be elicited from users explicitly,e.g.,through questionnaires, or implicitly—learned from their transactional behavior over time.More formally,let ContentðsÞbe an item profile,i.e.,a set of attributes characterizing item s.It is usually computed by extracting a set of features from item s(its content)and is used to determine the appropriateness of the item for recommendation purposes.Since,as mentioned earlier, content-based systems are designed mostly to recommend text-based items,the content in these systems is usually described with keywords.For example,a content-based component of the Fab system[8],which recommends Web pages to users,represents Web page content with the 100most important words.Similarly,the Syskill&Webert system[77]represents documents with the128most informative words.The“importance”(or“informative-ness”)of word k j in document d j is determined with some weighting measure w ij that can be defined in several different ways.One of the best-known measures for specifying keyword weights in Information Retrieval is the term frequency/inverse document frequency(TF-IDF)measure[89]that is defined as follows:Assume that N is the total number of documents that can be recommended to users and that keyword k j appears in n i of them.Moreover,assume that f i;j is the number of times keyword k i appears in document d j.Then, T F i;j,the term frequency(or normalized frequency)of keyword k i in document d j,is defined asT F i;j¼f i;jmax z f z;j;ð2Þwhere the maximum is computed over the frequencies f z;j of all keywords k z that appear in the document d j. However,keywords that appear in many documents are not useful in distinguishing between a relevant document and a nonrelevant one.Therefore,the measure of inverse document frequencyðIDF iÞis often used in combination with simple term frequencyðT F i;jÞ.The inverse document frequency for keyword k i is usually defined asIDF i¼log Nn i:ð3ÞThen,the TF-IDF weight for keyword k i in document d j is defined asw i;j¼T F i;jÂIDF ið4Þand the content of document d j is defined asContentðd jÞ¼ðw1j;...w kjÞ:As stated earlier,content-based systems recommend items similar to those that a user liked in the past[56],[69], [77].In particular,various candidate items are compared with items previously rated by the user and the best-matching item(s)are recommended.More formally,let ContentBasedP rofileðcÞbe the profile of user c containing tastes and preferences of this user.These profiles are obtained by analyzing the content of the items previously seen and rated by the user and are usually constructed using keyword analysis techniques from information retrieval.For example,ContentBasedP rofileðcÞcan be defined as a vector of weightsðw c1;...;w ckÞ,where each weight w ci denotes the importance of keyword k i to user c and can be computed from individually rated content vectors using a variety of techniques.For example,some averaging approach,such as Rocchio algorithm[85],can be used to compute ContentBasedP rofileðcÞas an“average”vector from an individual content vectors[8],[56].On the other hand,[77]uses a Bayesian classifier in order to estimate the probability that a document is liked.The Winnow algorithm[62]has also been shown to work well for this purpose,especially in the situations where there are many possible features[76].In content-based systems,the utility function uðc;sÞis usually defined as:uðc;sÞ¼scoreðContentBasedP rofileðcÞ;ContentðsÞÞ:ð5ÞUsing the above-mentioned information retrieval-based paradigm of recommending Web pages,Web site URLs, or Usenet news messages,both ContentBasedP rofileðcÞof user c and ContentðsÞof document s can be represented as TF-IDF vectors~w c and~w s of keyword weights.Moreover, utility function uðc;sÞis usually represented in the information retrieval literature by some scoring heuristic defined in terms of vectors~w c and~w s,such as the cosine similarity measure[7],[89]:uðc;sÞ¼cosð~w c;~w sÞ¼~w cÁ~w sjj~w c jj2Âjj~w s jj2¼P Ki¼1w i;c w i;sffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiP Ki¼1w2i;cqffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiP Ki¼1w2i;sq;ð6Þwhere K is the total number of keywords in the system.For example,if user c reads many online articles on the topic of bioinformatics,then content-based recommenda-tion techniques will be able to recommend other bioinfor-matics articles to user c.This is the case because these articles will have more bioinformatics-related terms(e.g.,“genome,”“sequencing,”“proteomics”)than articles on other topics and,therefore,ContentBasedP rofileðcÞ,as defined by vector~w c,will represent such terms k i with high weights w ic.Consequently,a recommender system using the cosine or a related similarity measure will assign higher utility uðc;sÞto those articles s that have high-weighted bioinformatics terms in~w s and lower utility to the ones where bioinformatics terms are weighted less.Besides the traditional heuristics that are based mostly on information retrieval methods,other techniques for content-based recommendation have also been used,such as Bayesian classifiers[70],[77]and various machine learning techniques,including clustering,decision trees, and artificial neural networks[77].These techniques differ from information retrieval-based approaches in that they calculate utility predictions based not on a heuristic formula,such as a cosine similarity measure,but rather are based on a model learned from the underlying data using statistical learning and machine learning techni-ques.For example,based on a set of Web pages that were rated as“relevant”or“irrelevant”by the user,[77]uses the naive Bayesian classifier[31]to classify unrated Web pages.More specifically,the naive Bayesian classifier is used to estimate the following probability that page p j belongs to a certain class C i(e.g.,relevant or irrelevant) given the set of keywords k1;j;...;k n;j on that page:PðC i j k1;j&...&k n;jÞ:ð7ÞMoreover,[77]uses the assumption that keywords are independent and,therefore,the above probability is proportional toPðC iÞYxPðk x;j j C iÞ:ð8ÞWhile the keyword independence assumption does not necessarily apply in many applications,experimental results demonstrate that naı¨ve Bayesian classifiers still produce high classification accuracy[77].Furthermore,both Pðk x;j j C iÞand PðC iÞcan be estimated from the underlying training data.Therefore,for each page p j,the probability PðC i j k1;j&...&k n;jÞis computed for each class C i and page p j is assigned to class C i having the highest probability[77].While not explicitly dealing with providing recommen-dations,the text retrieval community has contributed several techniques that are being used in content-based recommen-der systems.One example of such a technique would be the research on adaptive filtering[101],[112],which focuses on becoming more accurate at identifying relevant documents incrementally by observing the documents one-by-one in a continuous document stream.Another example would be the work on threshold setting[84],[111],which focuses on determining the extent to which documents should match a given query in order to be relevant to the user.Other text retrieval methods are described in[50]and can also be found in the proceedings of the Text Retrieval Conference (TREC)().As was observed in[8],[97],content-based recommender systems have several limitations that are described in the rest of this section.2.1.1Limited Content AnalysisContent-based techniques are limited by the features that are explicitly associated with the objects that these systems recommend.Therefore,in order to have a sufficient set of features,the content must either be in a form that can be parsed automatically by a computer(e.g.,text)or the features should be assigned to items manually.While information retrieval techniques work well in extracting features from text documents,some other domains have an inherent problem with automatic feature extraction.For example,automatic feature extraction methods are much harder to apply to multimedia data,e.g.,graphical images, audio streams,and video streams.Moreover,it is often not practical to assign attributes by hand due to limitations of resources[97].Another problem with limited content analysis is that,if two different items are represented by the same set of features,they are indistinguishable.Therefore,since text-based documents are usually represented by their most important keywords,content-based systems cannot distin-guish between a well-written article and a badly written one,if they happen to use the same terms[97].2.1.2OverspecializationWhen the system can only recommend items that score highly against a user’s profile,the user is limited to being recommended items that are similar to those already rated. For example,a person with no experience with Greek cuisine would never receive a recommendation for even the greatest Greek restaurant in town.This problem,which has also been studied in other domains,is often addressed by introducing some randomness.For example,the use of genetic algorithms has been proposed as a possible solution in the context of information filtering[98].In addition,the problem with overspecialization is not only that the content-based systems cannot recommend items that are different from anything the user has seen before.In certain cases,items should not be recommended if they are too similar to something the user has already seen,such as a different news article describing the same event.Therefore, some content-based recommender systems,such as Daily-Learner[13],filter out items not only if they are too different from the user’s preferences,but also if they are too similar to something the user has seen before.Furthermore,Zhang et al.[112]provide a set of five redundancy measures to evaluate whether a document that is deemed to be relevant contains some novel information as well.In summary,the diversity of recommendations is often a desirable feature in recommender systems.Ideally,the user should be pre-sented with a range of options and not with a homogeneous set of alternatives.For example,it is not necessarily a good idea to recommend all movies by Woody Allen to a user who liked one of them.2.1.3New User ProblemThe user has to rate a sufficient number of items before a content-based recommender system can really understand the user’s preferences and present the user with reliable recommendations.Therefore,a new user,having very few ratings,would not be able to get accurate recommendations.2.2Collaborative MethodsUnlike content-based recommendation methods,collabora-tive recommender systems(or collaborative filtering systems) try to predict the utility of items for a particular user based on the items previously rated by other users.More formally, the utility uðc;sÞof item s for user c is estimated based on the utilities uðc j;sÞassigned to item s by those users c j2C who are“similar”to user c.For example,in a movierecommendation application,in order to recommend movies to user c ,the collaborative recommender system tries to find the “peers”of user c ,i.e.,other users that have similar tastes in movies (rate the same movies similarly).Then,only the movies that are most liked by the “peers”of user c would be recommended.There have been many collaborative systems developed in the academia and the industry.It can be argued that the Grundy system [87]was the first recommender system,which proposed using stereotypes as a mechanism for building models of users based on a limited amount of information on each individual ing stereotypes,the Grundy system would build individual user models and use them to recommend relevant books to each ter on,the Tapestry system relied on each user to identify like-minded users manually [38].GroupLens [53],[86],Video Recommender [45],and Ringo [97]were the first systems to use collaborative filtering algorithms to automate prediction.Other examples of collaborative recommender systems include the book recommendation system from ,the PHOAKS system that helps people find relevant information on the WWW [103],and the Jester system that recommends jokes [39].According to [15],algorithms for collaborative recom-mendations can be grouped into two general classes:memory-based (or heuristic-based )and model-based .Memory-based algorithms [15],[27],[72],[86],[97]essentially are heuristics that make rating predictions based on the entire collection of previously rated items by the users.That is,the value of the unknown rating r c;s for user c and item s is usually computed as an aggregate of the ratings of some other (usually,the N most similar)users for the same item s :r c;s ¼aggr c 02^Cr c 0;s ;ð9Þwhere ^Cdenotes the set of N users that are the most similar to user c and who have rated item s (N can range anywhere from 1to the number of all users).Some examples of the aggregation function are:ða Þr c;s ¼1N Xc 02^C r c 0;s ;ðb Þr c;s¼k X c 02^Csim ðc;c 0ÞÂr c 0;s ;ðc Þr c;s ¼"rc þk Xc 02^Csim ðc;c 0ÞÂðr c 0;s À"rc 0Þ;ð10Þwhere multiplier k serves as a normalizing factor and is usually selected as k ¼1 P c 02^Cj sim ðc;c 0Þj ,and where the average rating of user c ,"rc ,in (10c)is defined as 1"r c ¼À1 j S c j ÁX s 2S cr c;s;where S c ¼f s 2S j r c;s ¼ g :ð11ÞIn the simplest case,the aggregation can be a simple average,as defined by (10a).However,the most common aggregation approach is to use the weighted sum,shown in (10b).The similarity measure between users c and c 0,sim ðc;c 0Þ,is essentially a distance measure and is used as aweight,i.e.,the more similar users c and c 0are,the more weight rating r c 0;s will carry in the prediction of r c;s .Note that sim ðx;y Þis a heuristic artifact that is introduced in order to be able to differentiate between levels of user similarity (i.e.,to be able to find a set of “closest peers”or “nearest neighbors”for each user)and,at the same time,simplify the rating estimation procedure.As shown in (10b),different recommendation applications can use their own user similarity measure as long as the calculations are normalized using the normalizing factor k ,as shown above.The two most commonly used similarity measures will be described below.One problem with using the weighted sum,as in (10b),is that it does not take into account the fact that different users may use the rating scale differently.The adjusted weighted sum,shown in (10c),has been widely used to address this limitation.In this approach,instead of using the absolute values of ratings,the weighted sum uses their deviations from the average rating of the correspond-ing user.Another way to overcome the differing uses of the rating scale is to deploy preference-based filtering [22],[35],[51],[52],which focuses on predicting the relative prefer-ences of users instead of absolute rating values,as was pointed out earlier in Section 2.Various approaches have been used to compute the similarity sim ðc;c 0Þbetween users in collaborative recom-mender systems.In most of these approaches,the similarity between two users is based on their ratings of items that both users have rated.The two most popular approaches are correlation and cosine-based .To present them,let S xy be the set of all items corated by both users x and y ,i.e.,S xy ¼f s 2S j r x;s ¼ &r y;s ¼ g .In collaborative recom-mender systems,S xy is used mainly as an intermediate result for calculating the “nearest neighbors”of user x and is often computed in a straightforward manner,i.e.,by computing the intersection of sets S x and S y .However,some methods,such as the graph-theoretic approach to collaborative filtering [4],can determine the nearest neighbors of x without computing S xy for all users y .In the correlation-based approach,the Pearson correlation coefficient is used to measure the similarity [86],[97]:sim ðx;y Þ¼Ps 2S xyðr x;s À"rx Þðr y;s À"r y ÞffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiP s 2S xyðr x;s À"r x Þ2P s 2S xyðr y;s À"ry Þ2r :ð12ÞIn the cosine-based approach [15],[91],the two users x and y are treated as two vectors in m -dimensional space,where m ¼j S xy j .Then,the similarity between two vectors can be measured by computing the cosine of the angle between them:sim ðx;y Þ¼cos ð~x ;~y Þ¼~x Á~yjj ~x jj 2Âjj ~y jj 2¼Ps 2S xy r x;s r y;s ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiP s 2S xyr 2x;sr ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiP s 2S xyr2y;sr ;ð13Þwhere ~x Á~y denotes the dot-product between the vectors ~xand ~y .Still another approach to measuring similarity between users uses the mean squared difference measure1.We use the r c;s ¼ notation to indicate that item s has not been rated by user c .。

采用改进的自适应模糊多级中值滤波算法去除牛肉图像斑点噪声

采用改进的自适应模糊多级中值滤波算法去除牛肉图像斑点噪声

采用改进的自适应模糊多级中值滤波算法去除牛肉图像斑点噪

贾渊;姬长英
【期刊名称】《农业工程学报》
【年(卷),期】2005(021)002
【摘要】牛肉图像中的斑点噪声与肌内脂肪的颜色特征相似,要准确提取牛肉图像中的肌内脂肪颜色特征,就必须先对斑点噪声进行滤除.为此在自适应模糊多级中值滤波的基础上进行了改进:第1步,确定当前点是否为噪声点.先计算当前像素点与其邻域均值的差的绝对值,然后与阈值(阈值随当前点的灰度值而变化)相比较,如果绝对值大于阈值,则被认为是斑点噪声.第2步,对于斑点噪声,将采用自适应模糊多级中值滤波方法来滤除;如果不是,保留原像素点不变.试验结果表明,改进的算法在斑点噪声滤除与细节保护方面均优于标准的中值滤波、多级中值滤波以及形态滤波.【总页数】4页(P102-105)
【作者】贾渊;姬长英
【作者单位】南京农业大学工学院,南京,210031;南京农业大学工学院,南
京,210031
【正文语种】中文
【中图分类】TP274+.3;TS251.5+2
【相关文献】
1.一种农业视觉图像改进自适应中值滤波算法 [J], 张倩
2.改进自适应中值滤波算法在图像去噪中的应用 [J], 潘涛;吴晓波;张伟伟;刘玮
3.矿山遥感图像自适应加权改进中值滤波算法 [J], 姚薇;钱玲玲
4.一种改进的遥感图像去噪自适应中值滤波算法 [J], 张燎;周小军;谭薇
5.一种去除椒盐噪声的自适应模糊中值滤波算法 [J], 万丰丰; 周国民; 周晓
因版权原因,仅展示原文概要,查看原文内容请购买。

用Python实现协同过滤的教程

用Python实现协同过滤的教程

⽤Python实现协同过滤的教程协同过滤在⽤户 —— 物品(user - item)的数据关系下很容易收集到⼀些偏好信息(preference),⽐如评分。

利⽤这些分散的偏好信息,基于其背后可能存在的关联性,来为⽤户推荐物品的⽅法,便是协同过滤,或称协作型过滤(collaborative filtering)。

这种过滤算法的有效性基础在于:⽤户的偏好具有相似性,即⽤户是可分类的。

这种分类的特征越明显,推荐的准确率就越⾼物品之间是存在关系的,即偏好某⼀物品的任何⼈,都很可能也同时偏好另⼀件物品不同环境下这两种理论的有效性也不同,应⽤时需做相应调整。

如⾖瓣上的⽂艺作品,⽤户对其的偏好程度与⽤户⾃⾝的品位关联性较强;⽽对于电⼦商务⽹站来说,商品之间的内在联系对⽤户的购买⾏为影响更为显著。

当⽤在推荐上,这两种⽅向也被称为基于⽤户的和基于物品的。

本⽂内容为基于⽤户的。

影评推荐实例本⽂主要内容为基于⽤户偏好的相似性进⾏物品推荐,使⽤的数据集为 GroupLens Research 采集的⼀组从 20 世纪 90 年代末到 21 世纪初由 MovieLens ⽤户提供的电影评分数据。

数据中包含了约 6000 名⽤户对约 4000 部电影的 100万条评分,五分制。

数据包可以从⽹上下载到,⾥⾯包含了三个数据表——users、movies、ratings。

因为本⽂的主题是基于⽤户偏好的,所以只使⽤ ratings 这⼀个⽂件。

另两个⽂件⾥分别包含⽤户和电影的元信息。

本⽂使⽤的数据分析包为 pandas,环境为 IPython,因此其实还默认携带了 Numpy 和 matplotlib。

下⾯代码中的提⽰符看起来不是 IPython 环境是因为 Idle 的格式发在博客上更好看⼀些。

数据规整⾸先将评分数据从 ratings.dat 中读出到⼀个 DataFrame ⾥:>>> import pandas as pd>>> from pandas import Series,DataFrame>>> rnames = ['user_id','movie_id','rating','timestamp']>>> ratings = pd.read_table(r'ratings.dat',sep='::',header=None,names=rnames)>>> ratings[:3]user_id movie_id rating timestamp0 1 1193 5 9783007601 1 661 3 9783021092 1 9143 978301968[3 rows x 4 columns]ratings 表中对我们有⽤的仅是 user_id、movie_id 和 rating 这三列,因此我们将这三列取出,放到⼀个以 user 为⾏,movie 为列,rating 为值的表 data ⾥⾯。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Improving collaborative filtering recommender system results and performance using genetic algorithmsJesus Bobadilla ⇑,1,Fernando Ortega,Antonio Hernando,Javier AlcaláUniversidad Politécnica de Madrid,Computer Science,Crta.De Valencia,Km 7,28031Madrid,Spaina r t i c l e i n f o Article history:Received 18October 2010Received in revised form 30March 2011Accepted 7June 2011Available online 15June 2011Keywords:Collaborative filtering Recommender systems Similarity measures MetricsGenetic algorithms Performancea b s t r a c tThis paper presents a metric to measure similarity between users,which is applicable in collaborative fil-tering processes carried out in recommender systems.The proposed metric is formulated via a simple lin-ear combination of values and weights.Values are calculated for each pair of users between which the similarity is obtained,whilst weights are only calculated once,making use of a prior stage in which a genetic algorithm extracts weightings from the recommender system which depend on the specific nat-ure of the data from each recommender system.The results obtained present significant improvements in prediction quality,recommendation quality and performance.Ó2011Elsevier B.V.All rights reserved.1.IntroductionThe basic principle of recommender systems (RS)is the expec-tation that the group of users similar to one given user,(i.e.those that have rated an important number of elements in a similar way to the user)can be used to adequately predict that individual’s rat-ings on products the user has no knowledge of.This way,a trip to Senegal could be recommended to an individual who has rated dif-ferent destinations in the Caribbean very highly,based on the positive ratings about the holiday destination of ‘‘Senegal’’of an important number of individuals who also rated destinations in the Caribbean very highly.This suggestion (recommendation)will often provide the user of the service with inspiring information from the collective knowledge of all other users of the service.In recent years,RS have played an important role in reducing the negative impact of information overload on those websites where users have the possibility of voting for their preferences on a series of articles or services.Movie recommendation websites are probably the most well-known cases to users and are without a doubt the most well studied by researchers [19,4,22],although there are many other fields in which RS have great and increasing importance,such as e-commerce [15],e-learning [9,5]and digital libraries [26,27].Currently,the fast increase of Web 2.0[18,23]has led to the proliferation of collaborative websites in which the number of ele-ments that can be recommended (e.g.blogs)can increase signifi-cantly when introduced (and not only voted)by the users,which generates new challenges for researchers in the field of RS,at the same time as it increases the possibilities and importance of these information retrieval techniques.The core of a RS is its filtering algorithms:demographic filtering [20]and content-based filtering [21]are the most basic tech-niques;the first is established on the assumption that individuals with certain common personal attributes (sex,age,country,etc.)will also have common preferences,whilst content-based filtering recommends items similar to the ones the user preferred in the past.Currently,collaborative filtering (CF)is the most commonly used and studied technique [12,24],it is based on the principle set out in the first paragraph of this section,in which in order to make a recommendation to a given user,it first searches for the users of the system who have voted in the most similar way to this user,to later make the recommendations by taking the items (holi-day destinations in our running example)most highly valued by the majority of their similar users.The most significant part of CF algorithms refers to the group of metrics used to determine the similitude between each pair of users [14,1,7],among which the Pearson correlation metric stands out as a reference.Genetic algorithms (GA)have mainly been used in two aspects of RS:clustering [16,17,28]and hybrid user models [10,13,2].A common technique to improve the features of RS consists of0950-7051/$-see front matter Ó2011Elsevier B.V.All rights reserved.doi:10.1016/j.knosys.2011.06.005⇑Corresponding author.Tel.:+34913365133;fax:+34913367522.E-mail addresses:jesus.bobadilla@upm.es (J.Bobadilla),fortegarequena@ (F.Ortega),ahernado@eui.upm.es (A.Hernando),jalcala@eui.upm.es (J.Alcalá).1Universidad Politécnica de Madrid &FilmAffi research team.initially carrying out a clustering on all of the users,in such a way that a group of classes of similar users is obtained,after this,the desired CF techniques can be applied to each of the clusters,obtain-ing similar results but in much shorter calculation times;these cases use common genetic clustering algorithms such as GA-based K -means [17].The RS hybrid user models commonly use a combination of CF with demographic filtering or CF with content based filtering,to exploit merits of each one of these techniques.In these cases,the chromosome structure can easily contain the demographic charac-teristics and/or those related to content-based filtering.The method proposed in the article uses GA,but with the advantage that it does not require the additional information pro-vided by the hybrid user models,and therefore,it can be used in all of the current RS,simply based on CF techniques.This is due to the fact that our method only uses the rating of users (which is the least possible information in any RS).The following section defines the proposed method (GA-meth-od)and the prior processing required using GA,after this,we pres-ent the sections which specify the design of experiments carried out and the results obtained,finally we list the most relevant con-clusions from this study.2.Design of the new similarity methodThe fundamental objective is to improve the results of CF by obtaining a metric that improves the accuracy [12,7,11,8]of CF based RS.For this purpose,after a series of experiments carried out on different metrics,different levels of sparsity [25,6]and dif-ferent databases,we have obtained an original,simple and efficient approach which improves the usual results obtained in RS.2.1.ValuesWe will consider a RS with a set of U users,{1,...,U },and a set of I items {1,...,I }.Users rate those items they know with a dis-crete range of possible values {m ,...,M }where m usually repre-sents that the user keeps completely unsatisfied about an item,and a value M usually represents that the user is completely satis-fied with an item.RS normally use m with value 1and M with value 5or 10.In this way,the range of possible ratings is usually {1,...,5}or {1,...,10}.The ratings made by a particular user x can be represented by avector,r x ¼r ð1Þx ;r ð2Þx ...;r ðI Þx with dimension I (the number of items in the RS)in such way that r i x represents the rating that the user x has made over the item i .Obviously,a user may not rate all the items in the RS.We will use the symbol to represent that a user has not rated an item.Consequently,we use the expression r ði Þx ¼ to state that the user x has not rated the item i yet.Next,we will consider an example.We will consider that m =1and M =5(that is to say the possible set of ratings is {1,...,5}),there are nine items,I =9,and there are two users whose ratings are represented by the following r 1and r 2vectors:r 1¼ð4;5; ;3;2; ;1;1;4Þr 2¼ð4;3;1;2; ;3;4; ;2ÞAs may be seen,while the user 1has rated the item 5,r 51¼2,theuser 2has not rated the item 5yet:r 52¼ .In order to compare both vectors,r x ,r y ,we can consider anothervector v x ;y ¼v ð0Þx ;y ;...;v ðM Àm Þx ;ywhose dimension is the number of the possible ratings that a user can make over an item.Each com-ponentv ði Þx ;y of the vector v x,y ,represents the ratio of items,j ,ratedby both users (that is to say,r ðj Þx – and r ðj Þy – )and over which theabsolute difference between the ratings of both users isi r j x Àr j y¼i,to the number of items rated by both users.That is to say,v ði Þx ;y ¼a =b where b is the number of items rated by both users,and a is the number of items rated by both users over which the absolute difference in the ratings of both users is i .In this way,the vector v 1,2for the previous example is the fol-lowing (just observe that there are only 5items rated by both users 1and 2):v 1;2¼ð1=5;1=5;2=5;1=5;0ÞAll components of the vector v 1,2are divided into 5since there are 5items rated by both users.The component v ð0Þx ;y represents the ratio of items which both users rated identically to the number of itemsrated by both users.In the previous example,v ð0Þ1;2¼1=5,since there is only one item (the item 1)which both users have rated identically(that is to say,r ð1Þ1Àr ð1Þ2 ¼0).In the same way,v ðM Àm Þx ;y represents the ratio of items rated in opposite way by both users,to the num-ber of items rated by both users.In the previous example,v ðM Àm Þ1;2¼v 41;2¼0=5¼0,since there are no items rated with values 5and 1(the highest difference in ratings)by the users 1and 2.Inthe example above,v ð2Þx ;y ¼2=5,since there are exactly two items,item 2and item 9,such that r ð2Þ1Àr ð2Þ2 ¼r ð9Þ1Àr ð9Þ2¼2.2.2.SimilarityWe will consider a family of similarity functions.For each vec-tor w =(w (0),...,w (M Àm ))whose components lie in the range [À1,1](that is to say,w ði Þ2½À1;1 Þ,we will consider the following similarity function:sim w ðx ;y Þ¼1M Àm þ1X M Àm i ¼0w ði Þv ði Þx ;yð1ÞConsequently,for each vector,w ,there is a similarity function whose component,w (i ),represents the importance of the compo-nent v ði Þx ;y for calculating the similarity between two users (according to this similarity function).In this way,the similarity function asso-ciated to the vector w =(1,0.5,0,À0.5,À1)represents a similarity function such that:Since w (0)=1,this similarity function evaluates highly posi-tively the number of items rated identically.Since w (4)=À1,this similarity function evaluates highly nega-tively the number of items which have been rated in oppositeway (w ð0Þx ¼À1).Since w (2)=0,this similarity function takes no consideration of those items over which the difference between the ratings made by both users is 2.Since w (1)=0.5,this similarity function evaluates with a posi-tive intermediate value those items over which the difference between the ratings made by both users is 1.Since w (3)=À0.5,this similarity function evaluates with a neg-ative intermediate value those items over which the difference between the ratings made by both users is 3.The question related to obtain the most suitable similarity func-tion represented by a vector w for a recommender system depends on the nature of the data in this recommender system.We will try to find,among all the possible vectors w ,one representing a simi-larity function which provides a minimal Mean Absolute Error (MAE)in the recommender system.In order to obtain this similar-ity function,we will use a genetic algorithm.J.Bobadilla et al./Knowledge-Based Systems 24(2011)1310–131613113.Genetic algorithmIn order tofind an optimal similarity function,sim w,we use a genetic algorithm tofind the vector w associated to the optimal similarity function sim w.We use a supervised learning task(Goldberg,1989)whosefit-ness function is the Mean Absolute Error MAE of the RS.In this way,the population of our genetic algorithm is the set of different vectors of weights,w.Each individual,that is to say each vector of weights,represents a possible similarity measure(see(1)),for which we will evaluate the MAE of the RS using this similarity measure.While running our genetic algorithm,the successive pop-ulation generations tend to improve the MAE in the RS.Our genetic algorithm stops generating populations when MAE in the RS for a vector of weight is lower than a threshold,c(which has been pre-viously established).As usual,we use only a part of the whole recommender system (training users and training items)in order to obtain an optimal similarity function.Once obtained this similarity function,we car-ry out our experiments to evaluate the similarity function obtained by using only the test users and the test items(that is to say,those users and items which have not been used in the GA algorithm).3.1.Genetic representationAs usual,individuals of populations are represented in binary form as strings of0s and1s.As we have previously stated,in our ge-netic algorithm,each vector of weights,w,representing a similarity vector is a possible individual of the population.Each component w(i)in the vector of w will be represented by10bits.Consequently, the vector w=(w(0),...,w(MÀm))will be represented by the follow-ing string of0s and1s(with a length of210(MÀm+1)bits):b9MÀm ...b1MÀmb0MÀmb9MÀmÀ1...b1MÀmÀ1b0MÀmÀ1...b91...b11b01b9 0...b1b1b01where each component of the vector w i e[À1,1]can be obtained through the following expression:w i¼2P9j¼102j b ji2À1À1ð2Þ3.2.Initial populationIn order to choose the population size,we have considered the criterion of using a number of individuals in the population which is the double of the number of bits used to represent each individ-ual[3].Consequently,when using Movielens and Netflix the initial population will be of100individuals,in view that in both recom-mender systems M=5and m=1,but when using FilmAffinity (where M=10and m=1)the initial population would be of200 individuals.Table1shows the precise information used in our experiments.In order to generate the initial population we have considered the following criteria:The50%of the initial population is obtained using random values.The50%of the initial population is seeded in areas where opti-mal vectors w may lie.In this way,the value w0measures how the similarity function weights the number of items rated identically by two users.Consequently we can reasonably expect that an optimal simi-larity function will have a high positive value of w(0).In this way,the value w(0)of individuals will be chosen randomly to lie within a high positive range of values.In the same way, the value w(MÀm)(w(4)for Movielens and w(9)for FilmAffinity) measures how the similarity function weights the number of items rated in a totally opposite way by two users.Conse-quently we can reasonably expect that an optimal similarity function will have a high negative value of w(MÀm).In this way,the value w(MÀm)of individuals will be chosen randomly to lie within a high negative range of values.Next,we will show the ranges used to seed the50%of the initial population.With the Movielens and Netflix Recommender System(m=1 and M=5):w02½1;0:6 ;w12½0:6;0:2 ;w22½0:2;À0:2 ;w32½À0:2;À0:6 ;w42½À0:6;À1With the FilmAffinity Recommender System(m=1and M=10):w02½1;0:8 ;w12½0:8;0:6 w22½0:6;0:4 ;w32½0:4;0:2 ;w42½0:2;0 ;w52½0;À0:2 ;w62½À0:2;À0:4 ;w72½À0:4;À0:6 ;w82½À0:6;À0:8 ;w92½À0:8;À13.3.Fitness functionThefitness function of a genetic algorithm is used to prescribe the optimality of a similarity function sim w(for the individual w).In our genetic algorithm,thefitness function will be the Mean Absolute Error(MAE)of the RS(indeed we only use the training users and the training items since we are trying tofind an optimal similarity function)for a particular similarity function sim w(de-scribed in Eq.(1)).The MAE is obtained by comparing the real ratings with the pre-dicted ratings made according to the similarity function.In order to calculate the MAE of the RS for a particular similarity function, sim w,we need to follow the next steps for each user x:1.Obtaining the set of K neighbors of x,K x(the K most similar usersto a given user x),through the similarity function sim w defined in Eq.(1).2.Calculating the prediction of the user x and an item i,p ix.This is obtained through the Deviation From Mean(DFM)as aggrega-tion approach:P ix¼ r xþPn2K x½sim wðx;nÞÂðr inÀ r nÞPn2K xsim wðx;nÞð3Þwhere r x is the average of ratings made by the user x.Once every possible prediction according to the similarity func-tion sim w is calculated,we obtain the MAE of the RS as follows:fitness¼MAE¼1#UXu2UPi2I up iuÀr iu#I uð4ÞWhen running the genetic algorithm,#U and#I u represent respec-tively the number of training users and the number of training items rated by the user u.Table1Descriptive information of the databases used in the experiments.Movielens Film affinity Netflix#Users604026,447480,189#Movies370621,12817,770#Ratings1,000,20919,126,278100,480,507Min and max values1–51–101–51312J.Bobadilla et al./Knowledge-Based Systems24(2011)1310–13163.4.Genetic operatorsAs usual,our genetic algorithm uses the common operators in genetic algorithms:selection,crossover(recombination)and mutation.Since we have obtained quick satisfactory results using these three classical operators,we have not used other possible operators like migration,regrouping or colonization-extinction. The features of our genetic operators are:Selection.The chosen method is thefitness proportional selec-tion.That is to say,the selection probability of an individual depends on itsfitness level.Crossover.We use the one-point crossover technique.Thecrossover probability is0.8.Mutation.We use a single point mutation technique in order tointroduce diversity.The mutation probability is0.02.3.5.Reproduction and terminationWhen using the reproduction operator,1000individuals are generated in each generation using random crossover between the best-fit parent individuals.The number of individuals keeps constant through every gener-ation.As we have stated above,the population is100when using Movielens and Netflix as recommender systems and200when using FilmAffinity as RS.We only keep the5%of the best individ-uals from each generation to obtain the next one(elitist selection).The genetic algorithm stops when there is an individual in the population with afitness value lower than a constant c.We use c=0.78for the Movielens and Netflix RS(in these databases,wehave that m=1and M=5)and we use c=1.15for the RS FilmAf-finity(in this database,we have that m=1and M=10).We have used these values according to the optimal values found in[7].4.Experiments4.1.Prediction and recommendation quality measuresIn this section,we show different experiments made in order to prove that the method proposed works for any different RS.In this way,we have used in the experiments the following three different databases(Table1)of real RS:Movielens:This database is a reference in research or RS over the last years.In this database,we can compare the results obtained using our method with the results previously obtained using other methods.FilmAffinity:This database contains a large amount of data.This database provides an experiment to prove that our GA method is useful for databases with a large amount of data.Netflix:This database offers us a very large database on which metrics,algorithms,programming and systems are put to the test.Since our method provides high values in the quality measures applied on the three databases,we reduce the danger that the proposed metric may only work for a specific RS.As usual,we will use the typical quality measures:Mean Absolute Error(MAE),cov-erage,precision and recall.The results of our proposed genetic algorithm are compared with the ones obtained using traditional metrics on RS collabora-tivefiltering:Pearson correlation,cosine and Mean Squared Differ-ences.These baseline metrics are used to compare our results obtained from the genetic algorithm with the ones obtained from these metrics.The genetic algorithm described previously is run20times. Each time the genetic algorithm runs,it provides a similarity func-tion sim w associated to the vector w(see Equation(1)).Associated to this similarity function,sim w,we calculate the typical quality measures:MAE,coverage,precision and recall.For each quality measure we show graphics depicting the best(labeled‘BestGA’) and worse value(labeled‘WorstGA’)obtained through the20run-nings.The area between them is displayed in grey color.Each gra-phic is described with the results obtained with the metrics: Pearson correlation(COR),cosine(COS)and Mean Squared Differ-ences(MSD).As we have stated above,we only use a part of the whole RS (training users and training items)in order to obtain an optimal similarity function.Once obtained this similarity function,we car-ry out our experiments using only the test users(the users which are not used in the GA algorithm)and the test items(the items which are not used in the GA algorithm).When using Movielens and FilmAffinity,we use20%of users (randomly chosen)as test users and20%of items(randomly cho-sen)as test items.We use the rest80%of users and items as train-ing users and training items.When using Netflix,we also use20% of items as test items but we only use5%of the users as test users due to the huge number of users in the database.The constant K related to the number of neighbors for each user, varies between50and800.These values enable us to view the trends on the graphics.The precision and recall recommendation quality results have been calculated using different values of N (number of recommendations made)from2to20.When using Movielens and Netflix the relevant threshold value=5,and=9 when using FilmAffinity(as stated above,while the possible value in the ranking of item is{1,...,5}in Netflix and Movielens,it is {1,...,10}in FilmAffinity).Table2shows the numerical parame-ters used in the experiments.4.2.Performance experimentIn this section,we describe an experiment which proves that predictions and recommendations can be made much faster when using the similarity function obtained with our GA-method(see Eq.(1))than when using the traditional metrics(Pearson Correlation, cosine,Mean Squared Differences).Indeed,since the similarity functions in our GA method(see Eq.(1))are much simpler than the formulae involved in the traditionalmetrics,we can obtain the k-neighbors for a user much faster(in this way,predictions and recommendations can be obtained much faster).The experiment designed compares the performance of differ-ent similarity measures by calculating the similarity between usersTable2Main parameters used in the experiments.K(MAE,coverage)Precision/recall Test users(%)Test items(%)Genetic runsRange Step K N hMovielens1M{50,...,800}50100{2,...,20}5202020 Film affinity{50,...,800}50150{2,...,20}5202020 Netflix{50,...,800}50200{2,...,20}952020J.Bobadilla et al./Knowledge-Based Systems24(2011)1310–13161313in Movielens.We compare the following similarity measures: Pearson correlation(COR),cosine(COS),Mean Squared Differences (MSD)and the similarity measure obtained with our GA-method.In this experiment,we havefirst divided the users in Movielens into two subsets:a subset of1204(20%of users which are re-garded as test users in Section4.1);and the subset of the rest of users(80%users,4832users).Once divided the database,we have calculated the similarity measure between each user in thefirst subset of20%users and each user in the second subset of80% users.5.Results5.1.Prediction and recommendation resultsIn this section we show the results obtained using the databases specified in Table1.Figs.1–3show respectively the results ob-tained with Movielens,FilmAffinity and Netflix.As may be seen in thesefigures,the results obtained for all the quality measures (MAE,coverage,precision and recall)with our genetic algorithm are better that the ones obtained with the traditional metrics.Next,we will analyze the results according to the threeany traditional metric used.This fact must be emphasized since the new latter similarity metrics which are usually proposed improve the MAE while resulting in a worse coverage[7].While Graphic1a shows that the best results in MAE with the GA-method are obtained when using a small value in K,Graphic 1b shows that the best results with the GA-method are obtained in coverage using medium values in K.In this way,we should use intermediate values in K(K2{150,...,200})for obtaining the most satisfactory results both in MAE and in coverage. Graphics1c and1d inform respectively about the precision and recall.These quality measures are improved for any value used in the number of recommendations,N.Consequently,the GA-method improves not only the accuracy and the coverage,but also provides better recommendations.FilmAffinity:The results obtained with this database provide similar results to the one obtained for the database Movielens. As illustrated in Graphic2a,we can see that our GA-method does not provide so good results in MAE with low K for this database as for MovieLens.However,it provides better results when using high values in K.The reader must observe that the ranking values used in FilmAffinity are larger({1,...,10}) than the ones used in Movielens.Traditional metrics and proposed genetic similarity method comparative results using Movielens:(a)accuracy(Mean Absolute Error),(b)coverage,(c) 1314J.Bobadilla et al./Knowledge-Based Systems24(2011)1310–13165.2.Performance resultsTable 3shows the results obtained in the experiments de-scribed in Section 4.2.As may be seen,the time needed to make predictions when using our GA method is 42.44%lower than the time needed when using Pearson correlation.Traditional metrics and proposed genetic similarity method comparative results using FilmAffinity:(a)accuracy (Mean Absolute Error),(b)coverage,(c)Traditional metrics and proposed genetic similarity method comparative results using Netflix:(a)accuracy (Mean Absolute Error),(b)coverage,(c)precision,Table 3Performance results obtained using:correlation,cosine,MSD and the proponed GA-method.Metric Correlation Cosine MSD GA-method Time (s)28,5629,1925,5616,47Since obtaining the k-neighbors for a user takes nearly the whole time forfinding the recommending items,the simplicity of the formula used for calculating the similarity function(used for obtaining k-neighbors)is crucial so as to accelerate the process offinding recommendations.Since the formula used in the similar-ity function in our GA method(see Eq.(1))is much simpler than the formulae involved in the classical metrics,our similarity functions based on the GA method let us make recommendations faster than the one used for traditional metrics.6.ConclusionsIn this paper we have presented a genetic algorithm method for obtaining optimal similarity functions.The similarity functions ob-tained provide better quality and quicker results than the ones pro-vided by the traditional metrics.Improvements can be seen in the system’s accuracy(MAE),in the coverage and in the precision&re-call recommendation quality measures.The proposed use of GAs applied to the RS is a novel approach and has the main advantage that it can be used in all CF-based RS,without the need to use hybrid models which often cannot be applied,as in many cases no reliable demographic information or content-basedfiltering information is available.The GA-metric runs42%as fast as the correlation,which is a great advantage in RS,which are highly dependent on equipment overloads when many different recommendation requests are made simultaneously(user to user)or on costly off-line running processes(item to item).AcknowledgementsOur acknowledgement to the MovieLens Group and the FilmAf-fi and Netflix companies.References[1]G.Adomavicius, A.Tuzhilin,Toward the next generation of recommendersystems:a survey of the state-of-the-art and possible extensions,IEEE Trans.Knowl.Data Eng.17(6)(2005)734–749.[2]M.Y.Al-Shamri,K.K.Bharadwaj,Fuzzy-genetic approach to recommendersystems based on a novel hybrid user model,Exp.Syst.Appl.(2008)1386–1399.[3]J.T.Alander,On optimal population size of genetic algorithms,Comput.Syst.SoftwareEng.(1992)65–70.[4]N.Antonopoulus,J.Salter,Cinema screen recommender agent:combiningcollaborative and content-basedfiltering,IEEE Intell.Syst.(2006)35–41.[5]J.Bobadilla, F.Serradilla, A.Hernando,Collaborativefiltering adaptedto recommender systems of e-learning,Knowl.Based Syst.22(2009) 261–265.[6]J.Bobadilla,F.Serradilla,The incidence of sparsity on collaborativefilteringmetrics,Australian Database Conf.ADC92(2009)9–18.[7]J.Bobadilla,F.Serradilla,J.Bernal,A new collaborativefiltering metric thatimproves the behavior of recommender systems,Knowl.Based Syst.23(6) (2010)520–528.[8]J.Bobadilla,F.Ortega,A.Hernando,A collaborativefiltering similarity measurebased on singularities,Inf.Proc.Manage.(2011),doi:10.1016/ j.ipm.2011.03.007.[9]H.Denis.Managing collaborative learning processes,e-learning applications.29th Int.Conf.Inf.Tech.Interfaces,(2007)345–350.[10]L.Q.Gao,C.Li,Hybrid personalizad recommended model based on geneticalgorithm,Int.Conf.Wireless w.Mobile Comput.(2008)9215–9218.[11]G.M.Giaglis,Lekakos,Improving the prediction accuracy of recommendationalgorithms:approaches anchored on human factors,p.18(3) (2006)410–431.[12]J.L.Herlocker,J.A.Konstan,J.T.Riedl,L.G.Terveen,Evaluating collaborativefiltering recommender systems,ACM Trans.Inf.Syst.22(1)(2004)5–53. [13]Y.Ho,S.Fong,Z.Yan,A hybrid ga-based collaborativefiltering model for onlinerecommenders,Int.Conf.e-Business(2007)200–203.[14]H.Ingoo,J.O.Kyong,H.R.Tae,The collaborativefiltering recommendationbased on SOM cluster-indexing CBR,Exp.Syst.Appl.25(2003)413–423. [15]H.Jinghua,W.Kangning,F.Shaohong,A survey of e-commerce recommendersystems,Int.Conf.Service Syst.Service Manage.(2007)1–5.[16]K.Kim,H.Ahn,Using a clustering genetic algorithm to support customersegmentation for personalizad recommender systems,Artif.Intell.Simulat.3397(2004)409–415.[17]K.Kim,H.Ahn,A recommender system using GA K-means clustering in anonline Shopping market,Expert Syst.with Appl.34(2)(2008)1200–1209.[18]M.Knights.Web2.0.IET Comm.Eng.(2007)30–35.[19]J.A.Konstan,ler,J.Riedl,PocketLens:toward a personal recommendersystem,ACM Trans.Inf.Syst.22(3)(2004)437–476.[20]B.Krulwich,Lifestylefinder:intelligent user profiling using large-scaledemographic data,Artif.Intell.Magaz.18(2)(1997)37–45.[21]ng.NewsWeeder:Learning tofilter netnews,12th Int.Conf.MachineLearning,(1995)331–339.[22]P.Li,S.Yamada,A movie recommender system based on inductive learning,IEEE Conf.Cyber.Intell.Syst.1(2004)318–323.[23]K.J.Lin.Building puter,(2007)101–102.[24]Y.Manolopoulus, A.Nanopoulus, A.N.Papadopoulus,P.Symeonidis,Collaborative recommender systems:combining effectiveness and efficiency, Exp.Syst.Appl.34(4)(2008)2995–3013.[25]M.Papagelis, D.Plexousakis,T.Kutsuras,Alleviating the sparsityproblem of collaborativefiltering using trust inferences,LNCS3477 (2005)224–239.[26]C.Porcel,E.Herrera-Viedma,Dealing with incomplete information in a fuzzylinguistic recommender system to diseminate information in university digital libraries,Knowl.Based Syst.23(1)(2010)32–39.[27]C.Porcel,J.M.Moreno,E.Herrera-Viedma,A multi-disciplinar recommendersystem to advice research resources in university digital libraries,Exp.Syst.Appl.36(2009)12520–12528.[28]F.Zhang,H.Y.Chang,A collaborativefiltering algorithm employing geneticclustering to ameliorate the scalability issue,IEEE Int.Conf.e-Business Eng.(2006)331–338.1316J.Bobadilla et al./Knowledge-Based Systems24(2011)1310–1316。

相关文档
最新文档