Github user jkbradley commented on a diff in the pull request:
https://github.com/apache/spark/pull/7705#discussion_r35726245
--- Diff:
mllib/src/main/scala/org/apache/spark/mllib/clustering/LDAOptimizer.scala ---
@@ -463,15 +458,73 @@ final class OnlineLDAOptimizer extends LDAOptimizer {
new BDM[Double](col, row, temp).t
}
+
+ override private[clustering] def getLDAModel(iterationTimes:
Array[Double]): LDAModel = {
+ new LocalLDAModel(Matrices.fromBreeze(lambda).transpose, alpha, eta,
gammaShape)
+ }
+
+}
+
+/**
+ * Serializable companion object containing helper methods and shared code
for
+ * [[OnlineLDAOptimizer]] and [[LocalLDAModel]].
+ */
+object OnlineLDAOptimizer {
--- End diff --
whole object can be private to clustering
---
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]