Cluster validation statistics for
different cluster sizes
Dunn index 1 (higher
better)
Dunn index 2 (higher
better)
Average Silhoutte
Width (higher better)
Pearson Gamma (higher
better)
Separation Index
(higher better)
Calinski &
Harabasz index (higher better)
Avg. distance within
clusters (higher better)
Avg. distance between
clusters (higher better)
Widest within-cluster
gap (lower better)
t-SNE Visualization for
different cluster sizes
Interpretation of clusters using
relative values for each variable
LS0tCnRpdGxlOiAiUHJlZGljdG9ycyBvZiBEZXByZXNzaW9uIER1cmluZyB0aGUgQ292aWQtMTkgUGFuZGVtaWMiIApzdWJ0aXRsZTogIkstTWVkb2lkcyBDbHVzdGVyaW5nIHBhcnQgMjogQ2x1c3RlciBWaXN1YWxzIgphdXRob3I6ICJTYXJrYSBUZXNhcm92YSwgT25kcmVqIFBla2FjZWssIEFsZXNzYW5kcm8gUG9ycm92ZWNjaGlvIgpkYXRlOiAiTGFzdCBlZGl0ZWQgYHIgZm9ybWF0IChTeXMudGltZSgpLCclZC4gJW0uICVZJylgIgpvdXRwdXQ6CiAgaHRtbF9kb2N1bWVudDogCiAgICBudW1iZXJfc2VjdGlvbnM6IHRydWUKICAgIHRoZW1lOiByZWFkYWJsZQogICAgY29kZV9mb2xkaW5nOiBoaWRlCiAgICBjb2RlX2Rvd25sb2FkOiB0cnVlCiAgICBjc3M6IGRvYy5jc3MKICAgIGluY2x1ZGVzOgogICAgICBpbl9oZWFkZXI6IGRvY3MvaGVhZGVyLmh0bWwKLS0tCgpgYGB7ciBzZXR1cCwgaW5jbHVkZT1GQUxTRX0Ka25pdHI6Om9wdHNfY2h1bmskc2V0KGVjaG8gPSBGQUxTRSkKYGBgCgpgYGB7ciBpbmNsdWRlPUZBTFNFfQojIFBhY2thZ2UgbmFtZXMKcGFja2FnZXMgPC0gYygiZHBseXIiLCAidGlkeXIiLCAiTmJDbHVzdCIsICJmYWN0b2V4dHJhIiwgImNsdXN0ZXIiLCAiY2xWYWxpZCIsICJtaWNlIiwgInBsb3RseSIsICJ2aXJpZGlzIiwg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