GitHub user badriub opened a pull request:

    https://github.com/apache/spark/pull/7652

    Added predictive probability to OneVsRestModel and LogisticRegressionModel

    1. I've declared a new method  predictPointWithProbability in 
GeneralizedLinearModel and implemented the method only for 
LogisticRegressionModel. 
    2. I calculate the probability using the odds ratio.
    3. For the other implementations of GeneralizedLinearModel, I have added an 
"not implemented exception". I can look into how to calculate probability if 
needed.
    
    WRT OVR,
    I've extracted the rawProbability as the maxProbability of all classes and 
added a new column in the returned dataframe.
    I've fixed the test to include the new column "rawProbability"

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/badriub/spark master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/7652.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #7652
    
----
commit f4e2089a0ac4a25d0690bef627dd1e00e0bcb959
Author: [email protected] <[email protected]>
Date:   2015-07-24T20:39:00Z

    Added predictive probability to OneVsRestModel and LogisticRegressionModel

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to