Skip to content

Commit 56fffd2

Browse files
andiwgkno10
authored andcommitted
fix BIRCH intercluster distance
1 parent 550de99 commit 56fffd2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

elki-clustering/src/main/java/elki/index/tree/betula/distance/BIRCHAverageInterclusterDistance.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public double squaredDistance(NumberVector v, ClusterFeature ocf) {
6464
for(int d = 0; d < dim; d++) {
6565
sum += v.doubleValue(d) * cf.ls(d);
6666
}
67-
sum = /* 1. * */ cf.sumdev() + cf.getWeight() * BIRCHCF.sumOfSquares(v) - 2 * sum;
67+
sum = /* 1. * */ cf.sumOfSumOfSquares() + cf.getWeight() * BIRCHCF.sumOfSquares(v) - 2 * sum;
6868
return sum > 0 ? sum / cf.getWeight() : 0;
6969
}
7070

0 commit comments

Comments
 (0)