GitHub user hhbyyh opened a pull request:
https://github.com/apache/spark/pull/11536
[SPARK-13629] [ML] Add binary toggle Param to CountVectorizer
## What changes were proposed in this pull request?
It would be handy to add a binary toggle Param to CountVectorizer, as in
the scikit-learn one:
http://scikit-learn.org/stable/modules/generated/sklearn.feature_extraction.text.CountVectorizer.html
If set, then all non-zero counts will be set to 1.
## How was this patch tested?
unit tests
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/hhbyyh/spark cvToggle
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/11536.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 #11536
----
commit 51695a09cb3c78a67f12e234d19cf6e1142a7b69
Author: Yuhao Yang <[email protected]>
Date: 2016-03-05T09:19:35Z
add toggle for countvectorizer
----
---
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]