| ClusterDistances | R Documentation |
Computes the within-cluster distances for each cluster.
ClusterDistances(FullDistanceMatrix, Cls,
Names, PlotIt = FALSE)
ClusterIntraDistances(FullDistanceMatrix, Cls,
Names, PlotIt = FALSE)
FullDistanceMatrix |
[1:n,1:n] symmetric distance matrix |
Cls |
[1:n] numerical vector of k classes |
Names |
Optional [1:k] character vector naming k classes |
PlotIt |
Optional, Plots if TRUE |
Returns a matrix with one column per cluster and one column containing all pairwise distances from the upper triangle of the complete distance matrix. Details and definitions can be found in [Thrun, 2021].
A matrix with k + 1 columns. The first column contains all pairwise distances; each remaining column contains the within-cluster distances for one cluster. Shorter columns are padded with NaN; a singleton cluster therefore has NaN as its within-cluster distance.
Michael Thrun
[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.
MDplot
ClusterInterDistances
data(Hepta)
Distance=as.matrix(dist(Hepta$Data))
interdists=ClusterDistances(Distance,Hepta$Cls)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.