ClusterInterDistances: Computes Inter-Cluster Distances

ClusterInterDistancesR Documentation

Computes Inter-Cluster Distances

Description

Computes the distances between each cluster and all other clusters.

Usage

ClusterInterDistances(FullDistanceMatrix, Cls,

Names,PlotIt=FALSE)

Arguments

FullDistanceMatrix

[1:n,1:n] symmetric distance matrix

Cls

[1:n] numerical vector of numbers defining the classification as the main output of the clustering algorithm for the n cases of data. It has k unique numbers representing the arbitrary labels of the clustering.

Names

Optional [1:k] character vector naming k classes

PlotIt

Optional, Plots if TRUE

Details

Cluster distances are given back as a matrix, one column per cluster and the vector of the full distance matrix without the diagonal elements and the upper half of the symmetric matrix. Details and definitons can be found in [Thrun, 2021].

Value

A matrix with k + 1 columns. The first column contains all pairwise distances; each remaining column contains the distances between one cluster and all other clusters. Shorter columns are padded with NaN to match the length of the upper triangle of the complete distance matrix.

Author(s)

Michael Thrun

References

[Thrun, 2021] Thrun, M. C.: The Exploitation of Distance Distributions for Clustering, International Journal of Computational Intelligence and Applications, Vol. 20(3), pp. 2150016, DOI: \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1142/S1469026821500164")}, 2021.

See Also

MDplot

ClusterDistances

Examples

data(Hepta)
Distance=as.matrix(dist(Hepta$Data))

interdists=ClusterInterDistances(Distance,Hepta$Cls)

FCPS documentation built on Oct. 3, 2026, 9:06 a.m.