Skip to content

Commit 1f9284a

Browse files
BryanCutlerMykhailo Shtelma
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 5152b3c commit 1f9284a

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
@@ -2096,6 +2096,11 @@ def test_java_params(self):
20962096
# NOTE: disable check_params_exist until there is parity with Scala API
20972097
ParamTests.check_params(self, cls(), check_params_exist=False)
20982098

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

21002105
def _squared_distance(a, b):
21012106
if isinstance(a, Vector):

0 commit comments

Comments
 (0)