Skip to content

Commit

Permalink
Clean up constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
jkni committed Sep 26, 2023
1 parent 59d5b53 commit 76fa03b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ public KMeansPlusPlusClusterer(float[][] points, int k, BiFunction<float[], floa
this.points = points;
this.k = k;
this.distanceFunction = distanceFunction;
this.random = new Random();
this.centroidDenoms = new int[k];
this.centroidNums = new float[k][points[0].length];
random = new Random();
centroidDenoms = new int[k];
centroidNums = new float[k][points[0].length];
centroids = chooseInitialCentroids(points);
assignments = new int[points.length];
assignPointsToClusters();
Expand Down

0 comments on commit 76fa03b

Please sign in to comment.