diff options
author | Imran Rashid <irashid@cloudera.com> | 2015-11-06 20:06:24 +0000 |
---|---|---|
committer | Sean Owen <sowen@cloudera.com> | 2015-11-06 20:06:24 +0000 |
commit | 49f1a820372d1cba41f3f00d07eb5728f2ed6705 (patch) | |
tree | 535797cc3662bfd7d8247b2d01f6fd00b2e1b2a9 /python/pyspark/ml/feature.py | |
parent | 62bb290773c9f9fa53cbe6d4eedc6e153761a763 (diff) | |
download | spark-49f1a820372d1cba41f3f00d07eb5728f2ed6705.tar.gz spark-49f1a820372d1cba41f3f00d07eb5728f2ed6705.tar.bz2 spark-49f1a820372d1cba41f3f00d07eb5728f2ed6705.zip |
[SPARK-10116][CORE] XORShiftRandom.hashSeed is random in high bits
https://issues.apache.org/jira/browse/SPARK-10116
This is really trivial, just happened to notice it -- if `XORShiftRandom.hashSeed` is really supposed to have random bits throughout (as the comment implies), it needs to do something for the conversion to `long`.
mengxr mkolod
Author: Imran Rashid <irashid@cloudera.com>
Closes #8314 from squito/SPARK-10116.
Diffstat (limited to 'python/pyspark/ml/feature.py')
-rw-r--r-- | python/pyspark/ml/feature.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/python/pyspark/ml/feature.py b/python/pyspark/ml/feature.py index c7b6dd926c..b02d41b52a 100644 --- a/python/pyspark/ml/feature.py +++ b/python/pyspark/ml/feature.py @@ -1788,21 +1788,21 @@ class Word2Vec(JavaEstimator, HasStepSize, HasMaxIter, HasSeed, HasInputCol, Has +----+--------------------+ |word| vector| +----+--------------------+ - | a|[-0.3511952459812...| - | b|[0.29077222943305...| - | c|[0.02315592765808...| + | a|[0.09461779892444...| + | b|[1.15474212169647...| + | c|[-0.3794820010662...| +----+--------------------+ ... >>> model.findSynonyms("a", 2).show() - +----+-------------------+ - |word| similarity| - +----+-------------------+ - | b|0.29255685145799626| - | c|-0.5414068302988307| - +----+-------------------+ + +----+--------------------+ + |word| similarity| + +----+--------------------+ + | b| 0.16782984556103436| + | c|-0.46761559092107646| + +----+--------------------+ ... >>> model.transform(doc).head().model - DenseVector([-0.0422, -0.5138, -0.2546, 0.6885, 0.276]) + DenseVector([0.5524, -0.4995, -0.3599, 0.0241, 0.3461]) .. versionadded:: 1.4.0 """ |