A Regularized Recommendation Algorithm with Probabilistic Sentiment-Ratings Filipa Peleja, Pedro Dias and João Magalhães Department of Computer Science Faculdade de Ciências e Tecnologia Universidade Nova de Lisboa
Users OBJECTIVE: HOW TO IMPROVE RECOMMENDATIONS WITH USER COMMENTS AND REVIEWS? Products 1 2... i... M 1 2... i... m 1 5 3 1 2 1 5 3 1 2 2 1 4 2 1 5 4 5... j 2 3 5 Recommendation algorithm... j 2 3 5...... N 3 n 4 3 4 Rating: Review: Love it or hate it!... Rating: Review: This is a miserable film. 1
PROPOSED SOLUTION Sentiment analysis 1. Corpus representation 2. Orientation and intensity of words 3. Review classification SentiWordNet Semantic Orientation Unrated Reviews Ratings Rated Reviews Sentiment-based recommendation 1. User/movie biases 2. Matrix factorization 3. Recommendations inference User-movie recommendations 2
SENTIMENT ANALYSIS CHALLENGES Opinions are written in natural language which implies : - subjectivity; - sarcasm; - irony; - idiomatic expressions; misspelling; etc. The same opinion word may be used in a positive or negative context Negative, Conditional and Comparative expressions 3
OPINION WORD ORIENTATION AND INTENSITY Semantic Orientation 1 : hits( word," excellent ") hits(" poor ") SO( word) log 2( ) hits( word," poor ") hits(" excellent ") How positive or negative is an opinion word? SentiWordNet 2 (1) TURNEY, P. 2002, THUMBS UP OR THUMBS DOWN? SEMANTIC ORIENTATION APPLIED TO UNSUPERVISED CLASSIFICATION OF REVIEWS (2) ESULI, A. AND SEBASTIANI, F., 2006, SENTIWORDNET: A PUBLICY AVAILABLE LEXICAL RESOURCE FOR OPINION MINING 4
Example Love it or hate it. However, can someone tell me what on earth the last page... word family SO (Google) + SentiWordNet - SentiWordNet love n -0.0824 1.375 0.0 it nointerest na na na or nointerest na na na hate v -0.8399 0.0 0.75 it nointerest na na na however r -0.34153 0.5 0.5 someone N -0.65935 0.0 0.0 tell V -0.3956 0.875 0.625 me nointerest na na na what nointerest na na na on nointerest na na na earth n -0.4041 0.0 0.625 5
MULTIPLE BERNOULLI CLASSIFICATION p( ra r re ) i i f r 10 L 1 ( ra, re ) f i L i ( ra, re ) i i A CLASSIFIER IS LEARNED FOR EVERY RATING VALUE THUS, FOR EACH RATING VALUE THERE IS A PREDICTION FOR EACH REVIEW THE PREDICTION IS NORMALIZED ACCORDINGLY TO THE PREDICTIONS OF ALL RATINGS RATING RANGE IMDB DATASET IS 1 TO 10 6
DATASET REVIEWS FROM IMDB A TOTAL OF 1,729,293 REVIEWS WERE COLLECTED Split #Reviews Description A 335,975 Only to train SA B 335,975 Test SA/Train RS C 417,147 Train RS (no explicit ratings) D 335,976 Train RS E 201,586 Test RS F 102,634 Validate RS 7
PERFORMANCE - SENTIMENT ANALYSIS 1.0 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0.0 1 2 3 4 5 6 7 8 9 10 Rating F-score on the IMDb corpus Precision Recall F-Score 8
PERFORMANCE - SENTIMENT ANALYSIS 9
INFERRED RATINGS IN RECOMMENDATION ALGORITHM Users Original ratings Media 5 1 4 2 3 3 2 Computed by the sentiment analysis algorithm Review-enhanced ratings 5 1 4 2 3 5 4 3 2 Review-based recommendation New recommendations 5 1 5 4 4 2 3 5 4 3 2 4 5 4 5 4 4 5 2 3 2 3 2 3 10
RATING MATRIX R ra r 11 1m r n1 r r nm HIGHLY INCOMPLETE SINCE MOST ELEMENTS ARE EMPTY PREDICT AN UNKNOWN RATING: rˆ p. q ui u i USERS AND PRODUCTS REPRESENTED IN THE SAME LATENT FACTOR SPACE WITH A SVD DECOMPOSITION THE RATING MATRIX R ra u u p p 11 1m 11 1m. P. Q u u p p n1 nm n1 nm T T MATRIX FACTORIZATION ENABLES THE ASSESSMENT OF USERS PREFERENCES REGARDING THE PRODUCTS BY CALCULATING THEIR FACTOR REPRESENTATIONS 11
RATINGS MATRIX Rra FACTORIZATION WITH BIASES GOAL: MINIMIZE THE PREDICTION ERROR pu, qi r R 2 2 2 2 2 ui ˆui u i u i [ P, Q] argmin ( r r ) ( p q b b ) ui ra 12
RATINGS MATRIX Rra FACTORIZATION WITH BIASES 2 2 2 2 2 2 ui ˆui ˆui ˆui u i u i pu, qi r R r Rˆ [ P, Q] argmin ( r r ) ( c r ) ( p q b b ) ui ra ui rev RATINGS INFERRED FROM THE SENTIMENT ANALYSIS FRAMEWORK ARE GIVEN TO THE RS THE REVIEWS ACTUAL RATING ARE KNOWN 13
RATINGS MATRIX Rra FACTORIZATION WITH SENTIMENT-BASED REGULARIZATION R R ra, R rev ENRICH THE MATRIX R WITH RATINGS INFERRED FROM REVIEWS WITH KNOWN AND UNKNOWN EXPLICIT RATINGS RREV Rˆ r rˆ cˆ rˆ 2 2 ra arg min ( ui ui) ui ( ui ui) rˆ ui r ˆ ui Rra cui Rrev 2 2 2 2 ( pu qi bu bi ), The confidence level is given by de Sentiment Analysis framework 14
RMSE RECOMMENDATIONS: IMDB DATASET 2.15 2.13 2.122 Lower RMSE error 2.11 2.099 2.094 2.09 2.07 2.05 DB Baseline (671,951 reviews) DB+Ci Sentiment-ratings DB+Ci Probabilistic sentiment-ratings Only Explicit Ratings Inferred Ratings Probabilistic Inferred Ratings 15
RMSE RECOMMENDATIONS: IMDB DATASET 2.15 2.13 Sentiment-ratings Probabilistic sentiment-ratings 2.121 2.128 2.11 2.099 2.09 2.086 2.082 2.08 2.079 2.07 2.05 D Baseline (335,976 reviews) D+Ci D+Bi D+BCi Reviews with Unknown ratings 16
SUMMARY Achievements: Extraction and sentiment analysis of users reviews Introduced sentiment-based ratings in a recommendation algorithm Next step: alternatives to SentiWordNet semantic orientation metric improve algorithm with opinion targets information 17
Thank you for your attention Questions? 18