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 Original file line number Diff line number Diff line change @@ -420,7 +420,7 @@ private[clustering] object LDA {
420
420
}
421
421
422
422
// todo: add reference to paper and Hoffman
423
- class OnlineLDAOptimizer (
423
+ private [clustering] class OnlineLDAOptimizer (
424
424
val documents : RDD [(Long , Vector )],
425
425
val k : Int ,
426
426
val vocabSize : Int ) extends Serializable {
@@ -463,12 +463,12 @@ private[clustering] object LDA {
463
463
case v => throw new IllegalArgumentException (" Do not support vector type " + v.getClass)
464
464
}
465
465
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
470
470
471
- var phinorm = expElogthetad * expElogbetad + 1e-100 // 1 * ids
471
+ var phinorm = expElogthetad * expElogbetad + 1e-100 // 1 * ids
472
472
var meanchange = 1D
473
473
val ctsVector = new BDV [Double ](cts).t // 1 * ids
474
474
You can’t perform that action at this time.
0 commit comments