-
- Downloads
[SPARK-14392][ML] CountVectorizer Estimator should include binary toggle Param
## What changes were proposed in this pull request? CountVectorizerModel has a binary toggle param. This PR is to add binary toggle param for estimator CountVectorizer. As discussed in the JIRA, instead of adding a param into CountVerctorizer, I moved the binary param to CountVectorizerParams. Therefore, the estimator inherits the binary param. ## How was this patch tested? Add a new test case, which fits the model with binary flag set to true and then check the trained model's all non-zero counts is set to 1.0. All tests in CounterVectorizerSuite.scala are passed. Author: wm624@hotmail.com <wm624@hotmail.com> Closes #12200 from wangmiao1981/binary_param.
Showing
- mllib/src/main/scala/org/apache/spark/ml/feature/CountVectorizer.scala 18 additions, 17 deletions...n/scala/org/apache/spark/ml/feature/CountVectorizer.scala
- mllib/src/test/scala/org/apache/spark/ml/feature/CountVectorizerSuite.scala 16 additions, 3 deletions...la/org/apache/spark/ml/feature/CountVectorizerSuite.scala
Please register or sign in to comment