GitHub user wangmiao1981 opened a pull request:
https://github.com/apache/spark/pull/12200
[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.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/wangmiao1981/spark binary_param
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/12200.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 #12200
----
commit 65dcb0434518c1b4d18ecbc9fe47587320a798fa
Author: [email protected] <[email protected]>
Date: 2016-04-05T23:39:53Z
move binary param out of CountVectorizerModel without test
commit dcad7996c762c25db8b37d8a07bd9dce1a807418
Author: [email protected] <[email protected]>
Date: 2016-04-06T06:16:53Z
Add test case and revert one change
----
---
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]