1. val vector = data.map{line=> val record = line.split("::") match{case Array(user,product,rate,timestamp)=> (timestamp.toInt % 10 , Rating(user.toInt,product.toInt,rate.toDouble)) } }
ALS.train(vector.values,irank,num,ilambda)
invalid because vector is RDD[Unit]
val vector = data.map{line=> val record = line.split("::") match{case Array(user,product,rate,timestamp)=> (timestamp.toInt % 10 , Rating(user.toInt,product.toInt,rate.toDouble)) } (record._1,record._2) }
ALS.train(vector.values,irank,num,ilambda)
valid!