Repository: spark
Updated Branches:
  refs/heads/master 529f84710 -> 44a9f8e6e


[SPARK-15009][PYTHON][FOLLOWUP] Add default param checks for 
CountVectorizerModel

## What changes were proposed in this pull request?

Adding test for default params for `CountVectorizerModel` constructed from 
vocabulary.  This required that the param `maxDF` be added, which was done in 
SPARK-23615.

## How was this patch tested?

Added an explicit test for CountVectorizerModel in DefaultValuesTests.

Author: Bryan Cutler <[email protected]>

Closes #20942 from 
BryanCutler/pyspark-CountVectorizerModel-default-param-test-SPARK-15009.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/44a9f8e6
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/44a9f8e6
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/44a9f8e6

Branch: refs/heads/master
Commit: 44a9f8e6e82c300dc61ca18515aee16f17f27501
Parents: 529f847
Author: Bryan Cutler <[email protected]>
Authored: Mon Apr 2 09:53:37 2018 -0700
Committer: Bryan Cutler <[email protected]>
Committed: Mon Apr 2 09:53:37 2018 -0700

----------------------------------------------------------------------
 python/pyspark/ml/tests.py | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/44a9f8e6/python/pyspark/ml/tests.py
----------------------------------------------------------------------
diff --git a/python/pyspark/ml/tests.py b/python/pyspark/ml/tests.py
index 6b4376c..c2c4861 100755
--- a/python/pyspark/ml/tests.py
+++ b/python/pyspark/ml/tests.py
@@ -2096,6 +2096,11 @@ class DefaultValuesTests(PySparkTestCase):
                     # NOTE: disable check_params_exist until there is parity 
with Scala API
                     ParamTests.check_params(self, cls(), 
check_params_exist=False)
 
+        # Additional classes that need explicit construction
+        from pyspark.ml.feature import CountVectorizerModel
+        ParamTests.check_params(self, 
CountVectorizerModel.from_vocabulary(['a'], 'input'),
+                                check_params_exist=False)
+
 
 def _squared_distance(a, b):
     if isinstance(a, Vector):


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to