spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Franco Barrientos" <>
Subject null Error in ALS model predict
Date Wed, 24 Dec 2014 15:44:24 GMT
Hi all!,


I have  a RDD[(int,int,double,double)] where the first two int values are id
and product, respectively. I trained an implicit ALS algorithm and want to
make predictions from this RDD. I make two things but I think both ways are


1-      Convert this RDD to RDD[(int,int)] and use
model.predict(RDD(int,int)), this works to me!

2-      Make a map and apply  model.predict(int,int), for example:

val ratings = RDD[(int,int,double,double)].map{ case (id, rubro, rating,



Where ratings is a RDD[Double].


Now, the second way when I apply a ratings.first() I get the follow error:


Why this happend? I need to use this second way.


Thanks in advance,


Franco Barrientos
Data Scientist

Málaga #115, Of. 1003, Las Condes.
Santiago, Chile.





View raw message