【问题标题】:Recommenderlab running into memory issuesRecommenderlab 遇到内存问题
【发布时间】: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

感谢任何有关如何解决内存问题的帮助

【问题讨论】:

    标签: r recommendation-engine


    【解决方案1】:

    我是推荐实验室的作者。现在尝试安装,它应该是固定的。然后使用 RSVD/ALS 求解。你的矩阵太大了,即使它对你的计算机来说是稀疏的。

    此外,在购买 AWS 内存实例之前先尝试较小的样本可能是个好主意。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-11-22
      • 2013-03-25
      • 1970-01-01
      • 2020-12-27
      • 1970-01-01
      • 2021-03-25
      相关资源
      最近更新 更多