RE: Getting prediction values in spark mllib

2016-02-11 Thread Chandan Verma
Thanks it got solved ☺ From: Artem Aliev [mailto:artem.al...@gmail.com] Sent: Thursday, February 11, 2016 3:19 PM To: Sonal Goyal Cc: Chandan Verma; user@spark.apache.org Subject: Re: Getting prediction values in spark mllib It depends on Algorithm you use NaiveBayesModel has

Re: Getting prediction values in spark mllib

2016-02-11 Thread Artem Aliev
It depends on Algorithm you use NaiveBayesModel has predictProbabilities method to work dirrectly with probabilites the LogisiticRegresionModel and SVMModel clearThreshold() will make predict method returns probabilites as mentioned above On Thu, Feb 11, 2016 at 11:17 AM, Sonal Goyal

Re: Getting prediction values in spark mllib

2016-02-11 Thread Sonal Goyal
Looks like you are doing binary classification and you are getting the label out. If you clear the model threshold, you should be able to get the raw score. On Feb 11, 2016 1:32 PM, "Chandan Verma" wrote: > > > Following is the code Snippet > > > > > >

Getting prediction values in spark mllib

2016-02-11 Thread Chandan Verma
Following is the code Snippet JavaRDD> predictionAndLabels = data .map(new Function>() { public Tuple2 call(LabeledPoint p) { Double