Skip to content

Commit

Permalink
fix average cluster distance update equation
Browse files Browse the repository at this point in the history
  • Loading branch information
Dev-Lan committed Aug 15, 2023
1 parent 1cbe3dc commit 4138746
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hcluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export function hcluster() {
case 'average':
distMatrix[j][c1] = distMatrix[c1][j] =
(cSize[c1] * distMatrix[c1][j] + cSize[c2] * distMatrix[c2][j]) /
(cSize[c1] + cSize[j]);
(cSize[c1] + cSize[c2]);
break;
}
}
Expand Down

0 comments on commit 4138746

Please sign in to comment.