Documentation of ClusterAnalysis types.

ClusterAnalysis.KmeansResultType
struct KmeansResult{T<:AbstractFloat}
    K::Int
    centroids::Vector{Vector{T}}
    cluster::Vector{Int}
    withinss::T
    iter::Int
end

Object resulting from kmeans algorithm that contains the number of clusters, centroids, clusters prediction, total-variance-within-cluster and number of iterations until convergence.

ClusterAnalysis.DBSCANType
struct DBSCAN{T<:AbstractFloat, KD<:KDTree}
    df::Matrix{T}
    ϵ::T
    min_pts::Int
    labels::Vector{Int}
    tree::KD
    clusters::Vector{Vector{Int}}
end

Struct that contains all the relevant information about the model. The data, ϵ, min_pts, labels, KDTree and clusters. The labels and the clusters are defined during the algorithm inside the routine inside fit!() function, which iterate over every observation p in the dataset.

Internal/External Constructors

  • Int - DBSCAN(df::Matrix{T}, ϵ::T, min_pts::Int) where {T<:AbstractFloat}
  • Ext - DBSCAN(table, ϵ::Real, min_pts::Int)
  • Ext - DBSCAN(df::Matrix{T}, ϵ::Real, minpts::Int) where {T<:AbstractFloat} = DBSCAN(df, T(ϵ), minpts)
  • Ext - DBSCAN(df::Matrix{T}, ϵ::Real, minpts::Int) where {T} = DBSCAN(Matrix{Float64}(df), ϵ, minpts)