GitHub user hujy opened a pull request:

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

    [SPARK-14623][ML]add label binarizer

    ## What changes were proposed in this pull request?
    SPARK-14623
    LabelBinarizer can make it possible to transformation a fixed set of class 
labels to binaries. It is to extend regression and binary classification 
algorithms to the multi-class classification case is to use one-vs-all scheme.
    
    ## How was this patch tested?
    LabelBinarizerSuiter unit tests (some existing tests will change or even be 
removed in this PR)
    Input:
    "yellow,green,red,green,0"
    The labels: "0, green, red, yellow"
    Output:
    0, 0, 0, 0, 1,  => 0's index in input is 5 and set 1 here
    0, 1, 0, 1, 0, 
    0, 0, 1, 0, 0, 
    1, 0, 0, 0, 0
    
    


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

    $ git pull https://github.com/hujy/spark lb

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

    https://github.com/apache/spark/pull/12380.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 #12380
    
----
commit 0aa27fc977e33fb1404431e4d1b761f0192ff4c3
Author: HuJiayin <[email protected]>
Date:   2016-04-14T03:34:04Z

    [SPARK-14623][ML]add label binarizer

----


---
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