Github user yanboliang commented on a diff in the pull request:
https://github.com/apache/spark/pull/14150#discussion_r70821003
--- Diff:
mllib/src/main/scala/org/apache/spark/mllib/clustering/LDAOptimizer.scala ---
@@ -508,8 +508,9 @@ final class OnlineLDAOptimizer extends LDAOptimizer {
val weight = rho()
val N = gammat.rows.toDouble
val alpha = this.alpha.asBreeze.toDenseVector
- val logphat: BDM[Double] =
sum(LDAUtils.dirichletExpectation(gammat)(::, breeze.linalg.*)) / N
- val gradf = N * (-LDAUtils.dirichletExpectation(alpha) +
logphat.toDenseVector)
+ val logphat: BDV[Double] =
+ sum(LDAUtils.dirichletExpectation(gammat)(::, breeze.linalg.*)).t / N
+ val gradf = N * (-LDAUtils.dirichletExpectation(alpha) + logphat)
--- End diff --
Breeze 0.12 has changed the type of return value of ```DenseMatrix(::,
*)``` from ```DenseMatrix``` to ```Transpose[DenseVector]```, so we should make
corresponding change.
---
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]