aboutsummaryrefslogtreecommitdiff
path: root/km-solve.c
diff options
context:
space:
mode:
Diffstat (limited to 'km-solve.c')
-rw-r--r--km-solve.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/km-solve.c b/km-solve.c
index 8a70a48..f579a41 100644
--- a/km-solve.c
+++ b/km-solve.c
@@ -163,6 +163,7 @@ km_solve(
mean_nears[row_map[i].cluster] += row_map[i].d2_near;
// calculate silouette denominator
+ // (https://en.wikipedia.org/wiki/Silhouette_%28clustering%29)
const float delta = row_map[i].d2_near - row_map[i].d2;
if (fabsf(delta) > MIN_CLUSTER_DISTANCE) {
silouette += delta / MAX(row_map[i].d2, row_map[i].d2_near);