R version 3.3.0 (2016-05-03) Sparklyr version ‘0.7.0’ Spark version 2.1 on YARN client
I am using Spark framework in R using Sparklyr for generating top-5 recommendations for products which are likely to be sold and their expected quantity using ALS factorization model. It is an implicit feedback model where the quantity purchased is an indicator of more preference-
model_als<-ml_als_factorization(x, rating.column = "quantity", user.column =
"customer",item.column = "product")
recos<-ml_recommend_als(model_als, type = c("users"), n = 5)
However, it gave below error-
Error: could not find function "ml_recommend_als"
I also tried using below using .jobj-
recos<-model_als$.jobj %>%
invoke("recommendForAllUsers",spark_dataframe(x),n=5) %>%
collect()
But it's giving below error-
Error: java.lang.IllegalArgumentException: invalid method recommendForAllUsers for object
Any help on this is greatly appreciated. Are the recommendations which get generated are for entirely new products or it includes products which are already bought too? If I am not able to do it in Spark, I will be proceeding with using recommenderlab in place of Spark ML libraries on my dataset of around 14 million records.