Github user jkbradley commented on a diff in the pull request:
https://github.com/apache/spark/pull/6000#discussion_r29976493
--- Diff:
examples/src/main/scala/org/apache/spark/examples/mllib/LDAExample.scala ---
@@ -128,7 +133,16 @@ object LDAExample {
// Run LDA.
val lda = new LDA()
- lda.setK(params.k)
+
+ val optimizer = params.algorithm match {
+ case "em" => new EMLDAOptimizer
+ case "online" => new OnlineLDAOptimizer().setMiniBatchFraction(0.05
+ 1.0 / actualCorpusSize)
--- End diff --
Please add a small comment saying the adjustment is to be more robust on
tiny datasets.
---
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]