Skip to content

Commit 70c9a4d

Browse files
committed
Make eucledian distance method public
1 parent 25d8e27 commit 70c9a4d

File tree

1 file changed

+1
-1
lines changed
  • src/main/groovy/net/zomis/machlearn/clustering

1 file changed

+1
-1
lines changed

src/main/groovy/net/zomis/machlearn/clustering/KMeans.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ private static int findClosestCluster(double[] input, double[][] centroids) {
118118
return closestIndex;
119119
}
120120

121-
private static double eucledianDistanceSquared(double[] input, double[] centroid) {
121+
public static double eucledianDistanceSquared(double[] input, double[] centroid) {
122122
if (input.length != centroid.length) {
123123
throw new IllegalArgumentException("Values must be of same length. Input has length " + input.length +
124124
"while centroid has length " + centroid.length);

0 commit comments

Comments
 (0)