Skip to content

Commit e0fcc6f

Browse files
committed
[SPARK-2199] perplexity for robust plsa fixed
1 parent 0d7469b commit e0fcc6f

File tree

1 file changed

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

1 file changed

+2
-2
lines changed

mllib/src/main/scala/org/apache/spark/mllib/clustering/topicmodeling/RobustPLSA.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,9 @@ class RobustPLSA(@transient protected val sc: SparkContext,
179179
parameters,
180180
collectionLength,
181181
par => (word,num) =>
182-
num * math.log(probabilityOfWordGivenTopic(word, par, topicsBC) +
182+
num * math.log((probabilityOfWordGivenTopic(word, par, topicsBC) +
183183
gamma * backgroundBC.value(word) +
184-
eps * par.noise(word) / (1 + eps + gamma)).toFloat)
184+
eps * par.noise(word)) / (1 + eps + gamma)).toFloat)
185185

186186
}
187187

0 commit comments

Comments
 (0)