ClusteringGA.CGAData
— TypeClusteringGA.CGAResult
— TypeCGAResult <: ClusteringResult
Contains the results from the computation of cga
.
Members
assignments::Vector{Int}
element-to-cluster assignments (n
)counts::Vector{Int}
number of samples assigned to each cluster (k
)found_gen::Int
first generation where the elite was foundtotal_gen::Int
total generations the GA has been run
ClusteringGA.cga
— Methodcga(objects::V,
distances::M=distance_matrix(objs),
N::Int=length(objs)*20,
generations::Int=50) where {S, V <: AbstractVector{S},
T <: Real, M <: AbstractMatrix{T}}
Compute the optimal clustering in the data by Genetic Algorithm over the computed mean silhouettes.
objects
the vector of the objects for which clusters are to be computed.distances
the distance matrix providing the pairwise distances bewtween theobjects
N
the population size for GA computationgenerations
number of generations the GA has to be run
The fitness
function used is 1+mean(silhouettes())
to ensure positive values.
Return Values
The method returns a tuple of (CGAData
, CGAResult
)
References
- Hruschka, Eduardo & Ebecken, Nelson. (2003). A genetic algorithm for cluster analysis. Intell. Data Anal.. 7. 15-25. 10.3233/IDA-2003-7103.