Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quality_index=:davis_bouldin or quality_index=:calinsky_harabasz not supported. #279

Closed
C37H41N2O6 opened this issue May 23, 2024 · 3 comments
Labels

Comments

@C37H41N2O6
Copy link

C37H41N2O6 commented May 23, 2024

I'm using Clustering v0.15.7.

When following commands is executed,
clustering_quality(embedding, res.centers, res.assignments, quality_index=:davis_bouldin)
or
clustering_quality(embedding, res.centers, res.assignments, quality_index = :calinsky_harabasz)
clustering_quality(Matrix(embedding), res.centers, res.assignments, quality_index = :calinsky_harabasz)

I get

ERROR: ArgumentError: quality_index=:davis_bouldin not supported.
Stacktrace:
[1] clustering_quality(data::Adjoint{Float64, Matrix{Float64}}, centers::Matrix{Float64}, assignments::Vector{Int64}; quality_index::Symbol, metric::Distances.SqEuclidean)
@ Clustering ~/.julia/packages/Clustering/JwhfU/src/clustering_quality.jl:98
[2] top-level scope
@ REPL[43]:1

or

ERROR: ArgumentError: quality_index=:calinsky_harabasz not supported.
Stacktrace:
[1] clustering_quality(data::Adjoint{Float64, Matrix{Float64}}, centers::Matrix{Float64}, assignments::Vector{Int64}; quality_index::Symbol, metric::Distances.SqEuclidean)
@ Clustering ~/.julia/packages/Clustering/JwhfU/src/clustering_quality.jl:98
[2] top-level scope
@ REPL[45]:1

The other :xie_beni, :dunn and : silhouettes are executed.

I would be grateful if you could tell me what to do.

@alyst alyst added the invalid label May 23, 2024
@alyst
Copy link
Member

alyst commented May 23, 2024

I think you miss "e" in the index name, it should be :davies_bouldin.
In the second one, it should be "i", not "y": :calinski_harabasz

@alyst alyst closed this as completed May 23, 2024
@C37H41N2O6
Copy link
Author

C37H41N2O6 commented May 24, 2024

@alyst
I would like to gratefully acknowledge.

There was copied from table in Clustering-quality-indices in Clustering.jl.
https://juliastats.org/Clustering.jl/stable/validate.html#Clustering-quality-indices

I apologise for any inconvenience caused by this silly mistake.

@alyst
Copy link
Member

alyst commented May 24, 2024

@C37H41N2O6 Oh, thanks for pointing out that there are typos in the docs! I'll fix them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants