Github user mengxr commented on a diff in the pull request:

    https://github.com/apache/spark/pull/2819#discussion_r19454162
  
    --- Diff: docs/mllib-feature-extraction.md ---
    @@ -95,8 +95,50 @@ tf.cache()
     val idf = new IDF(minDocFreq = 2).fit(tf)
     val tfidf: RDD[Vector] = idf.transform(tf)
     {% endhighlight %}
    +</div>
    +<div data-lang="python" markdown="1">
    +
    +TF and IDF are implemented in 
[HashingTF](api/python/pyspark.mllib.html#pyspark.mllib.feature.HashingTF)
    +and [IDF](api/python/pyspark.mllib.html#pyspark.mllib.feature.IDF).
    +`HashingTF` takes an RDD of list as the input.
    +Each record could be an iterable of strings or other types.
    +
    +{% highlight python %}
    +from pyspark import SparkContext
    +from pyspark.mllib.linalg import Vector
    --- End diff --
    
    `Vector` is not used


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to