Github user mengxr commented on the pull request:
https://github.com/apache/spark/pull/5500#issuecomment-93565804
@sryza Thanks for adding `OneHotEncoder` to `spark.ml`. One thing I want to
discuss is the expected input of `OneHotEncoder`. There are two use cases:
1. input a string column and output a vector column with binary values
2. input a column with category indices and output a vector column with
binary values
The input to 2) would be the output from `StringIndexer` we recently
merged. I would call 1) `OneHotEncoder`, which is a `UnaryTransformer`, and 2)
`StringVectorizer`, which is a combination of `StringIndexer` and
`OneHotEncoder`. If both of us agree on the semantics, we can implement 1) as
OneHotEncoder in this PR and add `StringVectorizer` in another PR. Does it
sound good to you?
---
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]