Skip to content

[SPARK-14623][ML]add label binarizer - #12380

Closed
hujy wants to merge 2 commits into
apache:masterfrom
hujy:lb
Closed

[SPARK-14623][ML]add label binarizer#12380
hujy wants to merge 2 commits into
apache:masterfrom
hujy:lb

Conversation

@hujy

@hujyhujy commented Apr 14, 2016

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

SPARK-14623
LabelBinarizer can make it possible to transform a fixed set of class labels to binaries. It uses one-vs-all scheme to extend regression and binary classification algorithms to the multi-class classification.

How was this patch tested?

LabelBinarizerSuiter unit tests
for example
Input:
"yellow,green,red,green,0"
The labels: "0, green, red, yellow"
Output:
0, 0, 0, 1
0, 1, 0, 0
0, 0, 1, 0
0, 1, 0, 0
1, 0 ,0, 0
=> 0's index in input is 5 and set 1 here

@hujy

hujy commented May 13, 2016

Copy link
Copy Markdown
ContributorAuthor

ok with test

@AmplabJenkins

Copy link
Copy Markdown

Can one of the admins verify this patch?

@srowen

Copy link
Copy Markdown
Member

Isn't this just one-hot encoding? Spark has had this for a long time.

@srowen

Copy link
Copy Markdown
Member

Let's close this

srowen added a commit to srowen/spark that referenced this pull request Feb 2, 2017
@srowensrowen mentioned this pull request Feb 2, 2017
@asfgitasfgit closed this in 20b4ca1Feb 3, 2017
zifeif2 pushed a commit to zifeif2/spark that referenced this pull request Nov 22, 2025
Closesapache#15736Closesapache#16309Closesapache#16485Closesapache#16502Closesapache#16196Closesapache#16498Closesapache#12380Closesapache#16764Closesapache#14394Closesapache#14204Closesapache#14027Closesapache#13690Closesapache#16279
Author: Sean Owen <sowen@cloudera.com>
Closesapache#16778 from srowen/CloseStalePRs.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@hujy@AmplabJenkins@srowen