【发布时间】:2016-04-16 15:43:24
【问题描述】:
我正在尝试将一些推荐算法相互比较,但遇到了一些内存问题。我使用的数据集是https://drive.google.com/open?id=0By5yrncwiz_VZUpiak5Hc2l3dkE
以下是我的代码:
library(recommenderlab)
library(Matrix)
Amazon <- read.csv(Path to Reviews.csv, header = TRUE,
col.names = c("ID","ProductId","UserId","HelpfulnessNumerator","HelpfulnessDenominator","Score",
"Time","Summary","Text"),
colClasses = c("NULL","character","character","NULL","NULL","integer","NULL","NULL","NULL"))
Amazon <- Amazon[,c("UserId","ProductId","Score")]
Amazon <- Amazon[!duplicated(Amazon[1:2]),] ## To get unique values
scheme <- evaluationScheme(r, method = "split", train = .7,
k = 1, given = 1 ,goodRating = 4)
algorithms <- list(
"user-based CF" = list(name="UBCF", param=list(normalize = "Z-score",
method="Cosine",
nn=50, minRating=3)),
"item-based CF" = list(name="IBCF", param=list(normalize = "Z-score"
))
)
results <- evaluate(scheme, algorithms, n=c(1, 3, 5))
我收到以下错误:
UBCF run fold/sample [model time/prediction time]
1 Timing stopped at: 1.88 0 1.87
Error in asMethod(object) :
Cholmod error 'problem too large' at file ../Core/cholmod_dense.c, line 105
IBCF run fold/sample [model time/prediction time]
1 Timing stopped at: 4.93 0.02 4.95
Error in asMethod(object) :
Cholmod error 'problem too large' at file ../Core/cholmod_dense.c, line 105
Warning message:
In .local(x, method, ...) :
Recommender 'user-based CF' has failed and has been removed from the results!
Recommender 'item-based CF' has failed and has been removed from the results!
我尝试使用我认为可以解决此问题但无法安装的推荐程序包。 https://github.com/sanealytics/recommenderlabrats
它给了我一些我无法理解的错误:
c:/rbuildtools/3.3/gcc-4.6.3/bin/../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64 -mingw32/bin/ld.exe:找不到-llapack collect2: ld 返回 1 个退出状态
然后我来到这个链接来解决推荐实验室的问题,但它对我不起作用 Error while installing package from github in R. Error in dyn.load
感谢任何有关如何解决内存问题的帮助
【问题讨论】: