recommendation engine - Wrong output in predict function from R package 'recommenderlab'? -


i need make recommender based on yelp database, i've filtered business reviews , user , created realratingmatrix user ratings respective businesses. though matrix gigantic i'm testing small matrix first (mdat matrix).

#learning matrix learningm <- as(mdat[1:8,],"realratingmatrix")  # matrix predict user recommendations testm <- as(mdat[9:10,],"realratingmatrix")  #using learning matrix create ubcf recommender rec <- recommender(learningm, method = "ubcf")  #function should output 2 business recommendations users of testm pre <- predict(rec, testm, n=2) 

instead receive output this:

> as(pre,"list") [[1]] character(0)  [[2]] character(0) 

why getting output? predict function calculating wrong results providing erroneous output or business column name different text type can't output correctly?

edit: mdat matrix requested, sorry not putting @ first place.

> dput(mdat) structure(c(1, na, na, na, na, na, na, na, na, na, na, 4, na,  na, na, na, na, na, na, na, na, na, 5, na, na, na, na, na, na,  na, na, na, na, 4, na, na, na, na, na, na, na, na, na, na, 3,  na, na, na, na, na, na, na, na, na, na, 1, na, na, na, na, na,  na, na, na, na, na, 4, na, na, na, na, na, na, na, na, na, na,  3, na, na, na, na, na, na, na, na, na, na, 5, na, na, na, na,  na, na, na, na, na, na, 5), .dim = c(10l, 10l), .dimnames = list( c("jqhp9mv2ryvmpdkvlofp0g", "tqkkml2nb19sxeg1aaxnsa", "cnmjxbzmxa9n7krlvlrzla",  "9v3uiutitc043y4qs54k1g", "nluwyi34r-cahlnmegelig", "6sustwhfsfva9nbidmon7q",  "icppbv3c7xvcyziznnq7fg", "muo7tlgr7sy1ob0mvxyphq", "gmvqyhmhngplg3aof8jmca",  "vngevhjutxcou-nhm8q5rq"), c("izydzvxoit648ezonep0pq", "hqjjha6brcrd0vr5askdkq",  "bul_5ahk_qyluaj4od27jg", "eooj2h1brzk1ahqscvihda", "roeqnfypi3jrv3wffr-f_g",  "ffp58kysk7djgs5er-5txw", "pvlm--hzy1a8sqmxiwez1a", "mta3fuonzjjgwqr9tchgha",  "qek3lop-ctzs72ygexiiqa", "57vozb9tq5sbnst9no-jxa"))) 

as explained vignette, recommenderlab trying solve sparse matrix regression problem. if test set of recommendations new users not same space set of values training set, there can no construction of sort of similarity measure new users old users. algorithm needs find old-users rated same items new users before can deliver further items other old user ratings.

a simple populatity recommendation not require finding subset of raters shared ratings new users.


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -