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

    https://github.com/apache/spark/pull/8279#discussion_r37315896
  
    --- Diff: docs/mllib-frequent-pattern-mining.md ---
    @@ -41,21 +41,23 @@ MLlib's FP-growth implementation takes the following 
(hyper-)parameters:
     
     [`FPGrowth`](api/scala/index.html#org.apache.spark.mllib.fpm.FPGrowth) 
implements the
     FP-growth algorithm.
    -It take a `JavaRDD` of transactions, where each transaction is an 
`Iterable` of items of a generic type.
    +It take a `RDD` of transactions, where each transaction is an `Array` of 
items of a generic type.
     Calling `FPGrowth.run` with transactions returns an
     
[`FPGrowthModel`](api/scala/index.html#org.apache.spark.mllib.fpm.FPGrowthModel)
     that stores the frequent itemsets with their frequencies.
     
     {% highlight scala %}
     import org.apache.spark.rdd.RDD
    -import org.apache.spark.mllib.fpm.{FPGrowth, FPGrowthModel}
    +import org.apache.spark.mllib.fpm.FPGrowth
     
    -val transactions: RDD[Array[String]] = ...
    +val data = sc.textFile("data/mllib/sample_fpgrowth.txt")
     
    -val fpg = new FPGrowth()
    +val transactions: RDD[Array[String]] = data.map(s => s.trim.split(' '))
    +
    +val fpm = new FPGrowth()
    --- End diff --
    
    Should be `fpg` for `FP-growth`.


---
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]

Reply via email to