我使用Movielens的rating数据使用ALS——implicit可以正常执行,使用MSWeb的binary数据时就会出错
ALS_implicit run fold/sample [model time/prediction time]
1 Used parameters:
lambda = 0.1
alpha = 0.5
n_factors = 10
n_iterations = 10
min_item_nr = 1
seed = 1234
verbose = TRUE
Timing stopped at: 0.02 0 0.02
Error in matrix2[only_new_users, , drop = FALSE] :
invalid or not-yet-implemented 'Matrix' subsetting
Warning message:
In .local(x, method, ...) :
Recommender 'ALS_implicit' has failed and has been removed from the results!
换成别的二值数据也是一样的错误?求大神帮忙看一下是什么问题
以下是程序:
data(MSWeb)
MSWeb10 <-MSWeb[which(rowSums(MSWeb)>10),]
scheme <- evaluationScheme(MSWeb10, method="cross", k=4, given=10)
algorithms <- list(
"random items" = list(name="RANDOM", param=list(normalize = "Z-score")),
"item-based CF" = list(name="IBCF", param=list(k=50)),
"ALS_implicit" = list(name="ALS_implicit",
param = list(lambda=0.1, alpha = 0.5, n_factors=10,
n_iterations=10, seed = 1234, verbose = TRUE))
)
results <- evaluate(scheme, algorithms, n=c(1, 3, 5, 10,15, 20))