《大数据分析全英文 (35).pdf》由会员分享,可在线阅读,更多相关《大数据分析全英文 (35).pdf(9页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、2Recommendation AlgorithmsMain AlgorithmsNeighborhood-basedUser-based FilteringItem-based Filtering1 Collaborative Filtering2 Content Based Filtering3 Knowledge BasedModel-basedMatrix Factorizationlatent Dirichlet allocation(LDA)Structured FeatureUnstructured FeatureLatent Factor modelGraph model.3L
2、ets watch a video“How Recommender Systems Work(NetflixAmazon)”4LFM(Latent factor model)Find some character the items may haveDecompose the rating matrix into item-character rating&user-character ratingAbstract model:just suppose the number of character5SVD(Singular Value Decomposition)The linear alg
3、ebra method used to decompose matrices Suppose the rating matrix is m:Compute the eigenvalue&eigenvector of&U matrix:the matrix of the eigenvectors of V matrix:the matrix of the eigenvectors of matrix:the square root of eigenvalues of SVD is often denoted6Matrix Decomposition SVD requires dense matr
4、ix,that is the matrix dont have missing values.Evidently,user-item rating matrix has lots of missing values.MatrixDecompositionSVD7Matrix Decomposition =,where is user-item rating matrix,is user-LF matrix,and is item-LF matrix.For u-user and i-item,their rating is:8Calculate&Cost function:only calcu
5、late cost function with the already given rating values by the users.The first term is the MSE of the predict rating value and true value.And the second part is regular value,which prevent overfitting.9Minimize cost functionTwo ways to minimize cost function:1.ALS(Alternating Least Square):fix P,com
6、pute Q to make c min;then,fix Q,compute P to make c min;End until reach max iteration or c satisfies threshold condition.Compute,and make the formula equals to 0,get.Similarly get.2.Gradient Descent Computeand .Iteration:is step size.iu u-10Hands-on1 User based RecommendationLoad&Relate two tables1.
7、1 Preprocessing1.2 Collaborative FilteringCreate DictionarySimilarity ComputingList top-10Recommendation2 Matrix DecompositionImport LibraryDatasetModelsGoalProcess-Import library-import data-Grid search SVD training-Use the best parameters obtained by grid search for training and prediction-Result visualization-Train and test on the best model-Get the best parameters for SVD,Funk or Bias SVD,Grid Search for training100,000 users ratings on moviesSurpriseCreate new data.csv
限制150内