Skip to content

Commit 26dca1b

Browse files
committed
style fix and make class private
1 parent 043e786 commit 26dca1b

File tree

1 file changed

+6
-6
lines changed
  • mllib/src/main/scala/org/apache/spark/mllib/clustering

1 file changed

+6
-6
lines changed

mllib/src/main/scala/org/apache/spark/mllib/clustering/LDA.scala

+6-6
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ private[clustering] object LDA {
420420
}
421421

422422
// todo: add reference to paper and Hoffman
423-
class OnlineLDAOptimizer(
423+
private[clustering] class OnlineLDAOptimizer(
424424
val documents: RDD[(Long, Vector)],
425425
val k: Int,
426426
val vocabSize: Int) extends Serializable{
@@ -463,12 +463,12 @@ private[clustering] object LDA {
463463
case v => throw new IllegalArgumentException("Do not support vector type " + v.getClass)
464464
}
465465

466-
var gammad = new Gamma(100, 1.0 / 100.0).samplesVector(k).t // 1 * K
467-
var Elogthetad = vector_dirichlet_expectation(gammad.t).t // 1 * K
468-
var expElogthetad = exp(Elogthetad.t).t // 1 * K
469-
val expElogbetad = _expElogbeta(::, ids).toDenseMatrix // K * ids
466+
var gammad = new Gamma(100, 1.0 / 100.0).samplesVector(k).t // 1 * K
467+
var Elogthetad = vector_dirichlet_expectation(gammad.t).t // 1 * K
468+
var expElogthetad = exp(Elogthetad.t).t // 1 * K
469+
val expElogbetad = _expElogbeta(::, ids).toDenseMatrix // K * ids
470470

471-
var phinorm = expElogthetad * expElogbetad + 1e-100 // 1 * ids
471+
var phinorm = expElogthetad * expElogbetad + 1e-100 // 1 * ids
472472
var meanchange = 1D
473473
val ctsVector = new BDV[Double](cts).t // 1 * ids
474474

0 commit comments

Comments
 (0)