Skip to content

Commit

Permalink
style fix and make class private
Browse files Browse the repository at this point in the history
  • Loading branch information
hhbyyh committed Feb 6, 2015
1 parent 043e786 commit 26dca1b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions mllib/src/main/scala/org/apache/spark/mllib/clustering/LDA.scala
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ private[clustering] object LDA {
}

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

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

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

Expand Down

0 comments on commit 26dca1b

Please sign in to comment.