I have a compilation guidance system using Spark with ALS filtering for mllib collaboration
my snippet code:
bestModel.get
.predict(toBePredictedBroadcasted.value)
evrything is fine, but I need a change code to request a full load, I read from scala doc in here
I need to use def recommendProducts
but when I tried in my code:
bestModel.get.recommendProductsForUsers(100)
and compilation error:
value recommendProductsForUsers is not a member of org.apache.spark.mllib.recommendation.MatrixFactorizationModel
[error] bestModel.get.recommendProductsForUsers(100)
can someone can help me
THX
NB: I am using Spark 1.5.0
my import:
import com.datastax.spark.connector._
import org.apache.spark.{SparkConf, SparkContext}
import org.apache.spark.SparkContext._
import java.io.File
import scala.io.Source
import org.apache.log4j.Logger
import org.apache.log4j.Level
import org.apache.spark.rdd._
import org.apache.spark.mllib.recommendation.{ALS, Rating, MatrixFactorizationModel}
import org.apache.spark.sql.SQLContext
import org.apache.spark.broadcast.Broadcast
source
share