Skip to content

Commit

Permalink
Simpler constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
freeman-lab committed Oct 29, 2014
1 parent c7050d5 commit 44050a9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ class StreamingKMeans(

/** Specify initial centers directly. */
def setInitialCenters(initialCenters: Array[Vector]): this.type = {
val clusterCounts = Array.fill(this.k)(0).map(_.toLong)
val clusterCounts = new Array[Long](this.k)
this.model = new StreamingKMeansModel(initialCenters, clusterCounts)
this
}
Expand Down

0 comments on commit 44050a9

Please sign in to comment.