We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b6f852e commit 0d7469bCopy full SHA for 0d7469b
mllib/src/main/scala/org/apache/spark/mllib/clustering/topicmodeling/AbstractPLSA.scala
@@ -49,7 +49,7 @@ private[topicmodeling] trait AbstractPLSA[DocumentParameterType <: DocumentParam
49
protected def getAlphabetSize(documents: RDD[Document]) = documents.first().alphabetSize
50
51
protected def getCollectionLength(documents: RDD[Document]) =
52
- documents.map(_.tokens.activeSize).reduce(_ + _)
+ documents.map(doc => sum(doc.tokens)).reduce(_ + _)
53
54
protected def singleDocumentLikelihood(parameter: DocumentParameters,
55
topicsBC: Broadcast[Array[Array[Float]]],
0 commit comments