-
- Downloads
[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 Author: Yuhao Yang <hhbyyh@gmail.com> Closes #11536 from hhbyyh/cvToggle.
Showing
- mllib/src/main/scala/org/apache/spark/ml/feature/CountVectorizer.scala 28 additions, 1 deletion...n/scala/org/apache/spark/ml/feature/CountVectorizer.scala
- mllib/src/test/scala/org/apache/spark/ml/feature/CountVectorizerSuite.scala 18 additions, 1 deletion...la/org/apache/spark/ml/feature/CountVectorizerSuite.scala
Loading
Please register or sign in to comment