aboutsummaryrefslogtreecommitdiff
path: root/examples/src/main/python/mllib/tf_idf_example.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/src/main/python/mllib/tf_idf_example.py')
-rw-r--r--examples/src/main/python/mllib/tf_idf_example.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/src/main/python/mllib/tf_idf_example.py b/examples/src/main/python/mllib/tf_idf_example.py
index c4d53333a9..b66412b233 100644
--- a/examples/src/main/python/mllib/tf_idf_example.py
+++ b/examples/src/main/python/mllib/tf_idf_example.py
@@ -43,7 +43,7 @@ if __name__ == "__main__":
# In such cases, the IDF for these terms is set to 0.
# This feature can be used by passing the minDocFreq value to the IDF constructor.
idfIgnore = IDF(minDocFreq=2).fit(tf)
- tfidfIgnore = idf.transform(tf)
+ tfidfIgnore = idfIgnore.transform(tf)
# $example off$
print("tfidf:")