Github user mengxr commented on a diff in the pull request:
https://github.com/apache/spark/pull/7360#discussion_r34605879
--- Diff:
mllib/src/main/scala/org/apache/spark/mllib/fpm/LocalPrefixSpan.scala ---
@@ -42,33 +42,36 @@ private[fpm] object LocalPrefixSpan extends Logging
with Serializable {
def run(
minCount: Long,
maxPatternLength: Int,
- prefix: Array[Int],
- projectedDatabase: Array[Array[Int]]): Array[(Array[Int], Long)] = {
- val frequentPrefixAndCounts = getFreqItemAndCounts(minCount,
projectedDatabase)
- val frequentPatternAndCounts = frequentPrefixAndCounts
- .map(x => (prefix ++ Array(x._1), x._2))
- val prefixProjectedDatabases = getPatternAndProjectedDatabase(
- prefix, frequentPrefixAndCounts.map(_._1), projectedDatabase)
+ prefix: List[Int],
+ database: Iterable[Array[Int]]): Iterator[(Array[Int], Long)] = {
--- End diff --
`database` should be an `Array[Array[Int]]`. We need multiple access to it.
The return type should be `Iterator[(List[Int], Long)]`.
---
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]