Skip to content

Conversation

@hujy
Copy link
Contributor

@hujy hujy commented Apr 14, 2016

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
Copy link
Contributor Author

hujy commented May 13, 2016

ok with test

@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@srowen
Copy link
Member

srowen commented Jan 24, 2017

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

@srowen
Copy link
Member

srowen commented Jan 28, 2017

Let's close this

srowen added a commit to srowen/spark that referenced this pull request Feb 2, 2017
@srowen srowen mentioned this pull request Feb 2, 2017
@asfgit asfgit closed this in 20b4ca1 Feb 3, 2017
Sign up for free to 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