spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Syrux <...@git.apache.org>
Subject [GitHub] spark pull request #17575: [SPARK-20265][MLlib] Improve Prefix'span pre-proc...
Date Mon, 10 Apr 2017 14:01:29 GMT
Github user Syrux commented on a diff in the pull request:

    https://github.com/apache/spark/pull/17575#discussion_r110662589
  
    --- Diff: mllib/src/test/scala/org/apache/spark/mllib/fpm/PrefixSpanSuite.scala ---
    @@ -360,6 +360,55 @@ class PrefixSpanSuite extends SparkFunSuite with MLlibTestSparkContext
{
         compareResults(expected, model.freqSequences.collect())
       }
     
    +  test("PrefixSpan pre-processing's cleaning test") {
    +
    +    // One item per itemSet
    +    val itemToInt1 = (4 to 5).zipWithIndex.toMap
    +    val sequences1 = Seq(
    +      Array(Array(4), Array(1), Array(2), Array(5), Array(2), Array(4), Array(5)),
    +      Array(Array(6), Array(7), Array(8)))
    +    val rdd1 = sc.parallelize(sequences1, 2).cache()
    +
    +    val cleanedSequence1 = PrefixSpan.toDatabaseInternalRepr(rdd1, itemToInt1).collect()
    +
    +    val expected1 = Array(Array(0, 4, 0, 5, 0, 4, 0, 5, 0))
    +      .map(x => x.map(y => {
    +        if (y == 0) 0
    --- End diff --
    
    Ok, changing it


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

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


Mime
View raw message