From 74d5d43a2cf4f3d40a6e0d9b7c820d169f2f9aaa Mon Sep 17 00:00:00 2001 From: Alexey Stukalov Date: Sat, 13 Apr 2024 18:32:01 -0700 Subject: [PATCH] validate: quality for different fuzzyness --- docs/source/validate.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/source/validate.md b/docs/source/validate.md index be0b99d4..981c83d3 100644 --- a/docs/source/validate.md +++ b/docs/source/validate.md @@ -237,18 +237,19 @@ savefig("clu_quality_hard.svg"); nothing # hide Fuzzy clustering quality for fuzzy C-means method with 2 to 5 clusters: ```@example clu_quality -fuzziness = 2 +fuzziness = [1.3 2 3] fuzzy_nclusters = 2:5 fuzzy_clusterings = fuzzy_cmeans.(Ref(X), fuzzy_nclusters, fuzziness) plot(( plot(fuzzy_nclusters, - clustering_quality.(Ref(X), fuzzy_clusterings, - fuzziness = fuzziness, quality_index = qidx), + [clustering_quality.(Ref(X), fuzz_clusterings, + fuzziness = fuzz, quality_index = qidx) + for (fuzz, fuzz_clusterings) in zip(fuzziness, eachcol(fuzzy_clusterings))], marker = :circle, - title = ":$qidx", label = nothing, + title = ":$qidx", label = ["Fuzziness $fuzz" for fuzz in fuzziness], ) for qidx in [:calinski_harabasz, :xie_beni])..., - layout = (1, 2), + layout = (1, 2), legend = :left, xaxis = "N clusters", yaxis = "Quality", plot_title = "\"Soft\" clustering quality indices", size = (700, 350), left_margin = 10pt