Skip to content

Commit 1f2d053

Browse files
committed
switched to reservoir sampling
1 parent 3893098 commit 1f2d053

File tree

1 file changed

+1
-1
lines changed
  • server/src/main/java/org/elasticsearch/index/codec/vectors/cluster

1 file changed

+1
-1
lines changed

server/src/main/java/org/elasticsearch/index/codec/vectors/cluster/KMeans.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class KMeans {
3737
* @return randomly selected centroids that are the min of centroidCount and sampleSize
3838
* @throws IOException is thrown if vectors is inaccessible
3939
*/
40-
static float[][] pickInitialCentroids(FloatVectorValues vectors, int m, int centroidCount) throws IOException {
40+
static float[][] pickInitialCentroids(FloatVectorValues vectors, int centroidCount) throws IOException {
4141
Random random = new Random(42L);
4242
int centroidsSize = Math.min(vectors.size(), centroidCount);
4343
float[][] centroids = new float[centroidsSize][vectors.dimension()];

0 commit comments

Comments
 (0)