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

    https://github.com/apache/spark/pull/6997#discussion_r33394169
  
    --- Diff: 
mllib/src/test/scala/org/apache/spark/mllib/fpm/FPGrowthSuite.scala ---
    @@ -61,17 +63,49 @@ class FPGrowthSuite extends SparkFunSuite with 
MLlibTestSparkContext {
         val model2 = fpg
           .setMinSupport(0.3)
           .setNumPartitions(4)
    +      .setOrdered(false)
           .run(rdd)
         assert(model2.freqItemsets.count() === 54)
     
         val model1 = fpg
           .setMinSupport(0.1)
           .setNumPartitions(8)
    +      .setOrdered(false)
           .run(rdd)
         assert(model1.freqItemsets.count() === 625)
       }
     
    -  test("FP-Growth using Int type") {
    +  test("FP-Growth frequent sequences using String type"){
    +    val transactions = Seq(
    +      "r z h k p",
    +      "z y x w v u t s",
    +      "s x o n r",
    +      "x z y m t s q e",
    +      "z",
    +      "x z y r q t p")
    +      .map(_.split(" "))
    +    val rdd = sc.parallelize(transactions, 2).cache()
    +
    +    val fpg = new FPGrowth()
    +
    +    val model1 = fpg
    +      .setMinSupport(0.5)
    +      .setNumPartitions(2)
    +      .setOrdered(true)
    +      .run(rdd)
    +
    +    val expected = Set(
    --- End diff --
    
    OK.
    
    The file at `path` has a specific format for encoding transactions; should 
I include that in comment as well or can I assume the user will be able to 
figure it out (it is the same format as the `zaki.txt` example file provided 
with R's `arulesSequences` package).


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