s(i) = (b(i) - a(i)) / max(a(i), b(i)); a(i) mean distance to own cluster (self excluded), b(i) smallest mean distance to any other cluster. Singleton clusters score 0 by convention.
Examples
V <- c(1, 2, 3, 4, 5, 6, 7, 8)
morie_geron_silhouette(V, V)
#> $silhouette
#> [1] 0
#>
#> $samples
#> [1] 0 0 0 0 0 0 0 0
#>
#> $a
#> [1] 0 0 0 0 0 0 0 0
#>
#> $b
#> [1] 1 1 1 1 1 1 1 1
#>
#> $cluster_means
#> 1 2 3 4 5 6 7 8
#> 0 0 0 0 0 0 0 0
#>
#> $n_clusters
#> [1] 8
#>
#> $estimate
#> [1] 0
#>
#> $n
#> [1] 8
#>
#> $method
#> [1] "Silhouette coefficient with euclidean distances (self excluded from cohesion)"
#>
