Github user mengxr commented on a diff in the pull request:
https://github.com/apache/spark/pull/7620#discussion_r35671223
--- Diff:
mllib/src/test/scala/org/apache/spark/mllib/clustering/LDASuite.scala ---
@@ -324,6 +324,58 @@ class LDASuite extends SparkFunSuite with
MLlibTestSparkContext {
}
}
+ test("Running EM LDA Optimizer with Empty Docs") {
+ val vocabSize = 6
+
+ def emptyDocs: Array[(Long, Vector)] = Array(
--- End diff --
~~~
val emptyDocs = Seq.fill(6)(Vectors.sparse(vocabSize, Array.empty,
Array.empty))
.zipWithIndex { case (wordCounts, docId) =>
(docId.toLong, wordCount)
}
~~~
---
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]