Providing intrinsic clustering quality indices #176
Annotations
3 errors
../../../.julia/packages/Documenter/9kOxY/src/utilities/utilities.jl#L44
failed to run `@example` block in source/validate.md:134-160
```@example
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))
clusterings = kmeans.(Ref(X), 2:5)
hard_indices = [:silhouette, :calinski_harabasz, :xie_beni, :davies_bouldin, :dunn]
kmeans_quality =
Dict(qidx => clustering_quality.(Ref(X), clusterings, quality_index = qidx)
for qidx in hard_indices
)
p = [
plot(2:5, kmeans_quality[qidx],
marker = :circle,
title = string.(qidx),
label = nothing,
)
for qidx in hard_indices
]
plot(p...,
layout = (3,2),
plot_title = "Quality indices for various number of clusters"
)
```
exception =
ArgumentError: Quality index silhouette not supported.
Stacktrace:
[1] clustering_quality(X::Matrix{Float64}, centers::Matrix{Float64}, assignments::Vector{Int64}; quality_index::Symbol, metric::Distances.SqEuclidean)
@ Clustering ~/work/Clustering.jl/Clustering.jl/src/clustering_quality.jl:59
[2] clustering_quality
@ ~/work/Clustering.jl/Clustering.jl/src/clustering_quality.jl:29 [inlined]
[3] #clustering_quality#40
@ ~/work/Clustering.jl/Clustering.jl/src/clustering_quality.jl:64 [inlined]
[4] clustering_quality
@ ~/work/Clustering.jl/Clustering.jl/src/clustering_quality.jl:64 [inlined]
[5] #43
@ ./broadcast.jl:1297 [inlined]
[6] _broadcast_getindex_evalf
@ ./broadcast.jl:683 [inlined]
[7] _broadcast_getindex
@ ./broadcast.jl:656 [inlined]
[8] getindex
@ ./broadcast.jl:610 [inlined]
[9] copy(bc::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Tuple{Base.OneTo{Int64}}, Base.Broadcast.var"#43#44"{Base.Pairs{Symbol, Symbol, Tuple{Symbol}, NamedTuple{(:quality_index,), Tuple{Symbol}}}, typeof(clustering_quality)}, Tuple{Base.RefValue{Matrix{Float64}}, Vector{KmeansResult{Matrix{Float64}, Float64, Int64}}}})
@ Base.Broadcast ./broadcast.jl:912
[10] materialize(bc::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Nothing, Base.Broadcast.var"#43#44"{Base.Pairs{Symbol, Symbol, Tuple{Symbol}, NamedTuple{(:quality_index,), Tuple{Symbol}}}, typeof(clustering_quality)}, Tuple{Base.RefValue{Matrix{Float64}}, Vector{KmeansResult{Matrix{Float64}, Float64, Int64}}}})
@ Base.Broadcast ./broadcast.jl:873
[11] (::Main.__atexample__300.var"#1#2")(qidx::Symbol)
@ Main.__atexample__300 ./none:0
[12] iterate
@ ./generator.jl:47 [inlined]
[13] _all(f::Base.var"#372#374", itr::Base.Generator{Vector{Symbol}, Main.__atexample__300.var"#1#2"}, #unused#::Colon)
@ Base ./reduce.jl:1282
[14] all
@ ./reduce.jl:1278 [inlined]
[15] Dict(kv::Base.Generator{Vector{Symbol}, Main.__atexample__300.var"#1#2"})
@ Base ./dict.jl:111
[16] top-level scope
@ validate.md:143
[17] eval
@ ./boot.jl:370 [inlined]
[18] #54
@ ~/.julia/packages/Documenter/9kOxY/src/expander_pipeline.jl:738 [inlined]
[19] cd(f::Documenter.var"#54#56"{Module, Expr}, dir::String)
@ Base.Filesystem ./file.jl:112
[20] (::Documenter.var"#53#55"{Documenter.Page, Module, Expr})()
@ Documenter ~/.julia/packages/Documenter/9kOxY/src/expander_pipeline.jl:737
[21] (::IOCapture.var"#3#5"{DataType, Documenter.var"#53#55"{Documenter.Page, Module, Expr}, Task, IOContext{Base.PipeEndpoint}, IOContext{Base.PipeEndpoint}, IOContext{Base.PipeEndpoint}, IOContext{Base.PipeEndpoint}})()
@ IOCapture ~/.julia/packages/IOCapture/8Uj7o/src/IOCapture.jl:119
[22] with_logstate(f::Function, logstate::Any)
@ Base.CoreLogging ./logging.jl:514
[23] with_logger
@ ./logging.jl:626 [inlined]
[24] capture(f::Documenter.var"#53#55"{Documenter.Page, Module, Expr}; rethrow::Type, color::Bool)
@ IOCapture ~/.julia/packages/IOCapture/8Uj7o/src/IOCapture.jl:116
[25] runner(#unused#::Type{Documenter.Expanders.ExampleBlocks}
|
../../../.julia/packages/Documenter/9kOxY/src/utilities/utilities.jl#L44
failed to run `@example` block in source/validate.md:163-191
```@example
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))
fuzziness = 2
soft_indices = [:calinski_harabasz, :xie_beni]
fuzzy_clusterings = fuzzy_cmeans.(Ref(X), 2:5, fuzziness)
fuzzy_cmeans_quality =
Dict(qidx => clustering_quality.(Ref(X), fuzzy_clusterings, fuzziness, quality_index = qidx)
for qidx in soft_indices
)
p = [
plot(2:5, fuzzy_cmeans_quality[qidx],
marker = :circle,
title = string.(qidx),
label = nothing,
)
for qidx in soft_indices
]
plot(p...,
layout = (2,1),
plot_title = "Quality indices for various number of clusters"
)
```
exception =
MethodError: no method matching clustering_quality(::Matrix{Float64}, ::FuzzyCMeansResult{Float64}, ::Int64; quality_index::Symbol)
Closest candidates are:
clustering_quality(::AbstractMatrix{<:Real}, ::FuzzyCMeansResult; quality_index, fuzziness, metric)
@ Clustering ~/work/Clustering.jl/Clustering.jl/src/clustering_quality.jl:119
clustering_quality(::AbstractMatrix{<:Real}, !Matched::AbstractMatrix{<:Real}, !Matched::AbstractVector{<:Integer}; quality_index, metric)
@ Clustering ~/work/Clustering.jl/Clustering.jl/src/clustering_quality.jl:29
clustering_quality(::AbstractMatrix{<:Real}, !Matched::KmeansResult; quality_index, metric)
@ Clustering ~/work/Clustering.jl/Clustering.jl/src/clustering_quality.jl:64
...
Stacktrace:
[1] (::Base.Broadcast.var"#43#44"{Base.Pairs{Symbol, Symbol, Tuple{Symbol}, NamedTuple{(:quality_index,), Tuple{Symbol}}}, typeof(clustering_quality)})(::Matrix{Float64}, ::Vararg{Any})
@ Base.Broadcast ./broadcast.jl:1297
[2] _broadcast_getindex_evalf
@ ./broadcast.jl:683 [inlined]
[3] _broadcast_getindex
@ ./broadcast.jl:656 [inlined]
[4] getindex
@ ./broadcast.jl:610 [inlined]
[5] copy
@ ./broadcast.jl:912 [inlined]
[6] materialize(bc::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Nothing, Base.Broadcast.var"#43#44"{Base.Pairs{Symbol, Symbol, Tuple{Symbol}, NamedTuple{(:quality_index,), Tuple{Symbol}}}, typeof(clustering_quality)}, Tuple{Base.RefValue{Matrix{Float64}}, Vector{FuzzyCMeansResult{Float64}}, Int64}})
@ Base.Broadcast ./broadcast.jl:873
[7] (::Main.__atexample__301.var"#1#2")(qidx::Symbol)
@ Main.__atexample__301 ./none:0
[8] iterate
@ ./generator.jl:47 [inlined]
[9] _all(f::Base.var"#372#374", itr::Base.Generator{Vector{Symbol}, Main.__atexample__301.var"#1#2"}, #unused#::Colon)
@ Base ./reduce.jl:1282
[10] all
@ ./reduce.jl:1278 [inlined]
[11] Dict(kv::Base.Generator{Vector{Symbol}, Main.__atexample__301.var"#1#2"})
@ Base ./dict.jl:111
[12] top-level scope
@ validate.md:173
[13] eval
@ ./boot.jl:370 [inlined]
[14] #54
@ ~/.julia/packages/Documenter/9kOxY/src/expander_pipeline.jl:738 [inlined]
[15] cd(f::Documenter.var"#54#56"{Module, Expr}, dir::String)
@ Base.Filesystem ./file.jl:112
[16] (::Documenter.var"#53#55"{Documenter.Page, Module, Expr})()
@ Documenter ~/.julia/packages/Documenter/9kOxY/src/expander_pipeline.jl:737
[17] (::IOCapture.var"#3#5"{DataType, Documenter.var"#53#55"{Documenter.Page, Module, Expr}, Task, IOContext{Base.PipeEndpoint}, IOContext{Base.PipeEndpoint}, IOContext{Base.PipeEndpoint}, IOContext{Base.PipeEndpoint}})()
@ IOCapture ~/.julia/packages/IOCapture/8Uj7o/src/IOCapture.jl:119
[18] with_logstate(f::Function, logstate::Any)
@ Base.CoreLogging ./logging.jl:514
[19] with_logger
@ ./logging.jl:626 [inlined]
[20] capture(f::Documenter.var"#53#55"{Documenter.Page, Module, Expr}; rethrow::Type, color::Bool)
@ IOCapture ~/.julia/packages/IOCapture/8Uj7o/src/IOCapture.jl:116
[21] runner(#unused#::Type{Documenter.Expanders.ExampleBl
|
|
The logs for this run have expired and are no longer available.
Loading