Description
`OneHotEncoder` takes a categorical column and output a vector column, which stores the category info in binaries.
val ohe = new OneHotEncoder() .setInputCol("countryIndex") .setOutputCol("countries")
It should read the category info from the metadata and assign feature names properly in the output column. We need to discuss the default naming scheme and whether we should let it process multiple categorical columns at the same time.
One category (the most frequent one) should be removed from the output to make the output columns linear independent. Or this could be an option tuned on by default.
Attachments
Issue Links
- is duplicated by
-
SPARK-1216 Add a OneHotEncoder for handling categorical features
- Resolved
- is related to
-
SPARK-7912 Make OneHotEncoder more optimistic about the input
- Resolved
- relates to
-
SPARK-1216 Add a OneHotEncoder for handling categorical features
- Resolved
-
SPARK-7579 User guide update for OneHotEncoder
- Resolved
- links to