aboutsummaryrefslogtreecommitdiff
path: root/python/pyspark/mllib/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/mllib/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/mllib/tests.py')
-rw-r--r--python/pyspark/mllib/tests.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/python/pyspark/mllib/tests.py b/python/pyspark/mllib/tests.py
index ac55fbf798..f272da56d1 100644
--- a/python/pyspark/mllib/tests.py
+++ b/python/pyspark/mllib/tests.py
@@ -1027,13 +1027,15 @@ class Word2VecTests(MLlibTestCase):
.setNumPartitions(2) \
.setNumIterations(10) \
.setSeed(1024) \
- .setMinCount(3)
+ .setMinCount(3) \
+ .setWindowSize(6)
self.assertEqual(model.vectorSize, 2)
self.assertTrue(model.learningRate < 0.02)
self.assertEqual(model.numPartitions, 2)
self.assertEqual(model.numIterations, 10)
self.assertEqual(model.seed, 1024)
self.assertEqual(model.minCount, 3)
+ self.assertEqual(model.windowSize, 6)
def test_word2vec_get_vectors(self):
data = [