Re: Number of goals to win championship

2015-02-09 Thread Xiangrui Meng
Logistic regression outputs probabilities if the data fits the model
assumption. Otherwise, you might need to calibrate its output to
correctly read it. You may be interested in reading this:
http://fastml.com/classifier-calibration-with-platts-scaling-and-isotonic-regression/.
We have isotonic regression implemented in Spark 1.3. Another problem
with your input is that the dataset is too small. Try to put more
points and see the result. Also, use LogisticRegressionWithLBFGS,
which is better than the SGD implementation. -Xiangrui

On Thu, Feb 5, 2015 at 10:40 AM, jvuillermet
 wrote:
> I want to find the minimum number of goals for a player that likely allows
> its team to win the championship.
>
> My data :
> goals win/loose
> 25 1
> 5   0
> 10  1
> 20  0
>
> After some reading and courses, I think I need a Logistic Regression model
> to get those datas.
> I create my LabeledPoint with those data (1/0 being the label) and use
> val model = LogisticRegressionWithSGD.train
>
> model.clearTreshold()
> I then try some model.predict(Vectors.dense(10)) but don't understand the
> output.
>
> All the results are > 0.5 and I'm not even sure how to use the predicted
> value.
> Am I using the good model ? How do I read the predicted value ?
> What do I need more to find a goal number from which it's likely your team
> will win the championship or say (3/4 chances to win it)
>
>
>
>
> --
> View this message in context: 
> http://apache-spark-user-list.1001560.n3.nabble.com/Number-of-goals-to-win-championship-tp21519.html
> Sent from the Apache Spark User List mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: user-unsubscr...@spark.apache.org
> For additional commands, e-mail: user-h...@spark.apache.org
>

-
To unsubscribe, e-mail: user-unsubscr...@spark.apache.org
For additional commands, e-mail: user-h...@spark.apache.org



Number of goals to win championship

2015-02-05 Thread jvuillermet
I want to find the minimum number of goals for a player that likely allows
its team to win the championship.

My data :
goals win/loose
25 1
5   0
10  1
20  0

After some reading and courses, I think I need a Logistic Regression model
to get those datas.
I create my LabeledPoint with those data (1/0 being the label) and use 
val model = LogisticRegressionWithSGD.train

model.clearTreshold()
I then try some model.predict(Vectors.dense(10)) but don't understand the
output.

All the results are > 0.5 and I'm not even sure how to use the predicted
value.
Am I using the good model ? How do I read the predicted value ? 
What do I need more to find a goal number from which it's likely your team
will win the championship or say (3/4 chances to win it)
 



--
View this message in context: 
http://apache-spark-user-list.1001560.n3.nabble.com/Number-of-goals-to-win-championship-tp21519.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: user-unsubscr...@spark.apache.org
For additional commands, e-mail: user-h...@spark.apache.org