aboutsummaryrefslogtreecommitdiff
path: root/python/pyspark/mllib/feature.py
diff options
context:
space:
mode:
authorlewuathe <lewuathe@me.com>2015-03-31 11:25:21 -0700
committerXiangrui Meng <meng@databricks.com>2015-03-31 11:25:21 -0700
commit46de6c05e0619250346f0988e296849f8f93d2b1 (patch)
treef5d626ca33660394ac699396ef5a3d003618daff /python/pyspark/mllib/feature.py
parentcd48ca50129e8952f487051796244e7569275416 (diff)
downloadspark-46de6c05e0619250346f0988e296849f8f93d2b1.tar.gz
spark-46de6c05e0619250346f0988e296849f8f93d2b1.tar.bz2
spark-46de6c05e0619250346f0988e296849f8f93d2b1.zip
[SPARK-6598][MLLIB] Python API for IDFModel
This is the sub-task of SPARK-6254. Wrapping IDFModel `idf` member function for pyspark. Author: lewuathe <lewuathe@me.com> Closes #5264 from Lewuathe/SPARK-6598 and squashes the following commits: 1dc522c [lewuathe] [SPARK-6598] Python API for IDFModel
Diffstat (limited to 'python/pyspark/mllib/feature.py')
-rw-r--r--python/pyspark/mllib/feature.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/python/pyspark/mllib/feature.py b/python/pyspark/mllib/feature.py
index 0ffe092a07..4bfe3014ef 100644
--- a/python/pyspark/mllib/feature.py
+++ b/python/pyspark/mllib/feature.py
@@ -244,6 +244,12 @@ class IDFModel(JavaVectorTransformer):
x = _convert_to_vector(x)
return JavaVectorTransformer.transform(self, x)
+ def idf(self):
+ """
+ Returns the current IDF vector.
+ """
+ return self.call('idf')
+
class IDF(object):
"""