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 c7050d5 commit 44050a9Copy full SHA for 44050a9
mllib/src/main/scala/org/apache/spark/mllib/clustering/StreamingKMeans.scala
@@ -178,7 +178,7 @@ class StreamingKMeans(
178
179
/** Specify initial centers directly. */
180
def setInitialCenters(initialCenters: Array[Vector]): this.type = {
181
- val clusterCounts = Array.fill(this.k)(0).map(_.toLong)
+ val clusterCounts = new Array[Long](this.k)
182
this.model = new StreamingKMeansModel(initialCenters, clusterCounts)
183
this
184
}
0 commit comments