Spark ML - LogisticRegression interpreting prediction

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
pun
Reply | Threaded
Open this post in threaded view
|

Spark ML - LogisticRegression interpreting prediction

pun
Hello,
I have a LogisticRegression model for predicting a binary label. Once I train the model, I run it to get some predictions. I get the following values for RawPrediction. How should I interpret these? Whdo they mean?
+----------------------------------------+
|rawPrediction                           |
+----------------------------------------+
|[30.376879013053156,-30.376879013053156]|
|[32.08591062636529,-32.08591062636529]  |
|[34.67079346038218,-34.67079346038218]  |
From scikit-learn, I believe, the two values for each user add up to 1. TIA

Sent from the Apache Spark User List mailing list archive at Nabble.com.
Reply | Threaded
Open this post in threaded view
|

Re: Spark ML - LogisticRegression interpreting prediction

Weichen Xu
The values you want to get (add up to 1.0) is "probability", not "rawPrediction".

Thanks!

On Mon, Oct 23, 2017 at 1:20 AM, pun <[hidden email]> wrote:
Hello,
I have a LogisticRegression model for predicting a binary label. Once I train the model, I run it to get some predictions. I get the following values for RawPrediction. How should I interpret these? Whdo they mean?
+----------------------------------------+
|rawPrediction                           |
+----------------------------------------+
|[30.376879013053156,-30.376879013053156]|
|[32.08591062636529,-32.08591062636529]  |
|[34.67079346038218,-34.67079346038218]  |
From scikit-learn, I believe, the two values for each user add up to 1. TIA

Sent from the Apache Spark User List mailing list archive at Nabble.com.

pun
Reply | Threaded
Open this post in threaded view
|

Re: Spark ML - LogisticRegression interpreting prediction

pun
In reply to this post by pun
Thanks a lot! You are right!



--
Sent from: http://apache-spark-user-list.1001560.n3.nabble.com/

---------------------------------------------------------------------
To unsubscribe e-mail: [hidden email]