Skip to content

Commit 7b12f63

Browse files
BryanCutlerRobert Kruszewski
authored andcommitted
[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 <cutlerb@gmail.com> Closes apache#20942 from BryanCutler/pyspark-CountVectorizerModel-default-param-test-SPARK-15009.
1 parent 6da0b82 commit 7b12f63

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

python/pyspark/ml/tests.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2094,6 +2094,11 @@ def test_java_params(self):
20942094
# NOTE: disable check_params_exist until there is parity with Scala API
20952095
ParamTests.check_params(self, cls(), check_params_exist=False)
20962096

2097+
# Additional classes that need explicit construction
2098+
from pyspark.ml.feature import CountVectorizerModel
2099+
ParamTests.check_params(self, CountVectorizerModel.from_vocabulary(['a'], 'input'),
2100+
check_params_exist=False)
2101+
20972102

20982103
def _squared_distance(a, b):
20992104
if isinstance(a, Vector):

0 commit comments

Comments
 (0)