diff options
Diffstat (limited to 'python/pyspark/ml/tests.py')
-rw-r--r-- | python/pyspark/ml/tests.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/python/pyspark/ml/tests.py b/python/pyspark/ml/tests.py index e95458699d..8954e96df9 100644 --- a/python/pyspark/ml/tests.py +++ b/python/pyspark/ml/tests.py @@ -918,7 +918,8 @@ class HashingTFTest(PySparkTestCase): df = sqlContext.createDataFrame([(0, ["a", "a", "b", "c", "c", "c"])], ["id", "words"]) n = 100 hashingTF = HashingTF() - hashingTF.setInputCol("words").setOutputCol("features").setNumFeatures(n).setBinary(True) + hashingTF.setInputCol("words").setOutputCol("features").setNumFeatures(n)\ + .setBinary(True).setHashAlgorithm("native") output = hashingTF.transform(df) features = output.select("features").first().features.toArray() expected = Vectors.sparse(n, {(ord("a") % n): 1.0, |