aboutsummaryrefslogtreecommitdiff
path: root/python/pyspark/ml/tests.py
diff options
context:
space:
mode:
authorJason Lee <cjlee@us.ibm.com>2016-04-18 12:47:14 -0700
committerJoseph K. Bradley <joseph@databricks.com>2016-04-18 12:47:14 -0700
commit3d66a2ce9bfc19096e07181f9e970372d32bbc0b (patch)
treed2e5205d84bd63a764801ff106f098897e507c41 /python/pyspark/ml/tests.py
parentd280d1da1aec925687a0bfb496f3a6e0979e896f (diff)
downloadspark-3d66a2ce9bfc19096e07181f9e970372d32bbc0b.tar.gz
spark-3d66a2ce9bfc19096e07181f9e970372d32bbc0b.tar.bz2
spark-3d66a2ce9bfc19096e07181f9e970372d32bbc0b.zip
[SPARK-14564][ML][MLLIB][PYSPARK] Python Word2Vec missing setWindowSize method
## What changes were proposed in this pull request? Added windowSize getter/setter to ML/MLlib ## How was this patch tested? Added test cases in tests.py under both ML and MLlib Author: Jason Lee <cjlee@us.ibm.com> Closes #12428 from jasoncl/SPARK-14564.
Diffstat (limited to 'python/pyspark/ml/tests.py')
-rw-r--r--python/pyspark/ml/tests.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/python/pyspark/ml/tests.py b/python/pyspark/ml/tests.py
index 9d6ff47b54..f1bca6ebe0 100644
--- a/python/pyspark/ml/tests.py
+++ b/python/pyspark/ml/tests.py
@@ -341,6 +341,11 @@ class ParamTests(PySparkTestCase):
params = param_store.params # should not invoke the property 'test_property'
self.assertEqual(len(params), 1)
+ def test_word2vec_param(self):
+ model = Word2Vec().setWindowSize(6)
+ # Check windowSize is set properly
+ self.assertEqual(model.getWindowSize(), 6)
+
class FeatureTests(PySparkTestCase):