Github user yu-iskw commented on a diff in the pull request:
https://github.com/apache/spark/pull/3603#discussion_r21588845
--- Diff: python/pyspark/mllib/feature.py ---
@@ -220,12 +220,15 @@ def transform(self, dataset):
the terms which occur in fewer than `minDocFreq`
documents will have an entry of 0.
- :param dataset: an RDD of term frequency vectors
- :return: an RDD of TF-IDF vectors
+ :param data: an RDD of term frequency vectors or a term frequency
vector
+ :return: an RDD of TF-IDF vectors or a TF-IDF vector
"""
- if not isinstance(dataset, RDD):
+ if isinstance(data, RDD):
+ return JavaVectorTransformer.transform(self, data)
+ elif isinstance(data, Vector):
--- End diff --
https://github.com/yu-iskw/spark/commit/a3bf566e923be8c8d5787d8c8ffb777a5886f360#diff-722e3d483892191debee07edd1a85fc8R226
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]