Hello everyone! I’m trying to use the package Clustering.jl. The documentation reports this code to calculate different performance indices.
using Plots, Clustering
X = hcat([4., 5.] .+ 0.4 * randn(2, 10),
[9., -5.] .+ 0.4 * randn(2, 5),
[-4., -9.] .+ 1 * randn(2, 5))
nclusters = 2:5
clusterings = kmeans.(Ref(X), nclusters)
plot((
plot(nclusters,
clustering_quality.(Ref(X), clusterings, quality_index = qidx),
marker = :circle,
title = ":$qidx", label = nothing,
) for qidx in [:silhouettes, :calinski_harabasz, :xie_beni, :davies_bouldin, :dunn])...,
layout = (3, 2),
xaxis = "N clusters",
plot_title = "\"Hard\" clustering quality indices"
)
when I try it, this error is displayed: “clustering_quality is not defined”. Should I add something? Thank you very much.