GitHub user BigCrunsh opened a pull request:
https://github.com/apache/spark/pull/2137
mllib: Clarify learning interfaces
** Make threshold mandatory **
Currently, the output of ``predict`` for an example is either the score
or the class. This side-effect is caused by ``clearThreshold``. To
clarify that behaviour three different types of predict (predictScore,
predictClass, predictProbabilty) were introduced; the threshold is not
longer optional.
** Clarify classification interfaces
Currently, some functionality is spreaded over multiple models.
In order to clarify the structure and simplify the implementation of
more complex models (like multinomial logistic regression), two new
classes are introduced:
- BinaryClassificationModel: for all models that derives a binary
classification from a single weight vector. Comprises the tresholding
functionality to derive a prediction from a score. It basically captures
SVMModel and LogisticRegressionModel.
- ProbabilitistClassificaitonModel: This trait defines the interface for
models that return a calibrated confidence score (aka probability).
** Misc
- some renaming
- add test for probabilistic output
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/soundcloud/spark mllib-improvements
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/2137.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 #2137
----
commit b015b7a6bfe1db4cf57cce1e96c08904f0758100
Author: Christoph Sawade <[email protected]>
Date: 2014-08-22T20:38:40Z
Clarify learning interfaces
* Make threshold mandatory
Currently, the output of ``predict`` for an example is either the score
or the class. This side-effect is caused by ``clearThreshold``. To
clarify that behaviour three different types of predict (predictScore,
predictClass, predictProbabilty) were introduced; the threshold is not
longer optional.
* Clarify classification interfaces
Currently, some functionality is spreaded over multiple models.
In order to clarify the structure and simplify the implementation of
more complex models (like multinomial logistic regression), two new
classes are introduced:
- BinaryClassificationModel: for all models that derives a binary
classification from a single weight vector. Comprises the tresholding
functionality to derive a prediction from a score. It basically captures
SVMModel and LogisticRegressionModel.
- ProbabilitistClassificaitonModel: This trait defines the interface for
models that return a calibrated confidence score (aka probability).
* Misc
- some renaming
- add test for probabilistic output
----
---
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]