Re: org.apache.spark.ml.recommendation.ALS

2015-04-14 Thread Xiangrui Meng
7;.' found. > [INFO] }.toDF("user", "item", "rate”)} > [INFO] ^ > > when I tried below code > > val ratings = purchase.map ( line => > line.split(',') match { case Array(user, item, rate) => > (user.toInt, item.toInt, rate.toF

Re: org.apache.spark.ml.recommendation.ALS

2015-04-13 Thread Jay Katukuri
ried below code >> >> val ratings = purchase.map ( line => >> line.split(',') match { case Array(user, item, rate) => >> (user.toInt, item.toInt, rate.toFloat) >> }).toDF("user", "item", "rate") >> >> >

Re: org.apache.spark.ml.recommendation.ALS

2015-04-08 Thread Jay Katukuri
7; expected but '.' found. >>>> [INFO] }.toDF("user", "item", "rate”)} >>>> [INFO] ^ >>>> >>>> when I tried below code >>>> >>>> val ratings = purchase.map ( line => >>>> l

Re: org.apache.spark.ml.recommendation.ALS

2015-04-08 Thread Jay Katukuri
"user", "item", "rate") >>> >>> >>> error: value toDF is not a member of org.apache.spark.rdd.RDD[(Int, Int, >>> Float)] >>> [INFO] possible cause: maybe a semicolon is missing before `value toDF'? >>> [INFO]

Re: org.apache.spark.ml.recommendation.ALS

2015-04-06 Thread Jay Katukuri
>> >> >> >> I have looked at the document that you have shared and tried the following >> code: >> >> case class Record(user: Int, item: Int, rate:Double) >> val ratings = purchase.map(_.split(',')).map(r =>Record(r(0).

Re: org.apache.spark.ml.recommendation.ALS

2015-04-06 Thread Xiangrui Meng
rd(r(0).toInt, > r(1).toInt, r(2).toDouble)) .toDF("user", "item", "rate") > > for this, I got the below error: > > error: value toDF is not a member of org.apache.spark.rdd.RDD[Record] > > > Appreciate your help ! > > Thanks, > Jay > &g

Re: org.apache.spark.ml.recommendation.ALS

2015-04-06 Thread Jay Katukuri
')).map(r =>Record(r(0).toInt, >> r(1).toInt, r(2).toDouble)) .toDF("user", "item", "rate") >> >> for this, I got the below error: >> >> error: value toDF is not a member of org.apache.spark.rdd.RDD[Record] >> >> >> Appreciate your help !

Re: org.apache.spark.ml.recommendation.ALS

2015-04-06 Thread Xiangrui Meng
(1).toInt, r(2).toDouble)) .toDF("user", "item", "rate") > > for this, I got the below error: > > error: value toDF is not a member of org.apache.spark.rdd.RDD[Record] > > > Appreciate your help ! > > Thanks, > Jay > > > On Mar 16,

org.apache.spark.ml.recommendation.ALS

2015-04-06 Thread Jay Katukuri
;)).map(r =>Record(r(0).toInt, >>>> r(1).toInt, r(2).toDouble)) .toDF("user", "item", "rate") >>>> >>>> for this, I got the below error: >>>> >>>> error: value toDF is not a member of org.apache.spark.rdd

Re: RDD to DataFrame for using ALS under org.apache.spark.ml.recommendation.ALS

2015-03-26 Thread Chang Lim
After this line: val sc = new SparkContext(conf) You need to add this line: import sc.implicits._ //this is used to implicitly convert an RDD to a DataFrame. Hope this helps -- View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/RDD-to-DataFrame-for-using-

Re: RDD to DataFrame for using ALS under org.apache.spark.ml.recommendation.ALS

2015-03-17 Thread Xiangrui Meng
).map(r =>Record(r(0).toInt, >>> r(1).toInt, r(2).toDouble)) .toDF("user", "item", "rate") >>> >>> for this, I got the below error: >>> >>> error: value toDF is not a member of org.apache.spark.rdd.RDD[Record] >>> >

Re: RDD to DataFrame for using ALS under org.apache.spark.ml.recommendation.ALS

2015-03-17 Thread Xiangrui Meng
> > error: value toDF is not a member of org.apache.spark.rdd.RDD[Record] > > > Appreciate your help ! > > Thanks, > Jay > > > On Mar 16, 2015, at 11:35 AM, Xiangrui Meng wrote: > > Try this: > > val ratings = purchase.map { line => > line.split(&#

Re: RDD to DataFrame for using ALS under org.apache.spark.ml.recommendation.ALS

2015-03-16 Thread Xiangrui Meng
guide.html -Xiangrui On Mon, Mar 16, 2015 at 9:08 AM, jaykatukuri wrote: > Hi all, > I am trying to use the new ALS implementation under > org.apache.spark.ml.recommendation.ALS. > > > > The new method to invoke for training seems to be override def fit(dataset: > Dat

RDD to DataFrame for using ALS under org.apache.spark.ml.recommendation.ALS

2015-03-16 Thread jaykatukuri
Hi all, I am trying to use the new ALS implementation under org.apache.spark.ml.recommendation.ALS. The new method to invoke for training seems to be override def fit(dataset: DataFrame, paramMap: ParamMap): ALSModel. How do I create a dataframe object from ratings data set that is on hdfs