Skip to content

Commit

Permalink
For comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
viirya committed Feb 11, 2015
1 parent 9af1487 commit 4870fe4
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -456,13 +456,11 @@ private[clustering] object LDA {
val random = new Random(partIndex + randomSeed)
partEdges.flatMap { edge =>
val gamma = normalize(BDV.fill[Double](k)(random.nextDouble()), 1.0)
val sum = BDV.zeros[Double](k)
brzAxpy(edge.attr, gamma, sum)

val sum = gamma * edge.attr
Seq((edge.srcId, sum), (edge.dstId, sum))
}
}
verticesTMP.reduceByKey((sum0, sum1) => { sum0 + sum1 })
verticesTMP.reduceByKey(_ + _)
}

val docTermVertices = createVertices()
Expand Down

0 comments on commit 4870fe4

Please sign in to comment.