ClusterDunnIndex: Dunn Index

View source: R/ClusterDunnIndex.R

ClusterDunnIndexR Documentation

Dunn Index

Description

Internal (i.e. without prior classification) cluster quality measure called Dunn index for a given clustering published in [Dunn, 1974].

Usage

ClusterDunnIndex(Cls,DataOrDistances,

DistanceMethod="euclidean",Silent=TRUE,Force=FALSE,...)

Arguments

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.

DataOrDistances

matrix, DataOrDistance[1:n,1:n] symmetric matrix of dissimilarities, if variable unsymmetric DataOrDistance[1:d,1:n] is assumed as a dataset and the euclidean distances are calculated of d variables and n cases

DistanceMethod

Optional, one of 39 distance methods of parDist of package parallelDist, if Data matrix is chosen above

Silent

TRUE: Warnings are shown

Force

TRUE: force computing in case of numerical instability

...

Further arguments passed on to the parDist function, e.g. user_defined distance functions

Details

Dunn index is defined as Dunn=min(InterDist)/max(IntraDist). Well seperated clusters have usually a dunn index above 1, for details please see [Dunn, 1974].

Value

List of

Dunn

scalar, Dunn Index

IntraDist

[1:k] numerical vector of minimal intra cluster distances per given cluster

InterDist

[1:k] numerical vector of minimal inter cluster distances per given cluster

Author(s)

Michael Thrun

References

[Dunn, 1974] Dunn, J. C.: Well_separated clusters and optimal fuzzy partitions, Journal of cybernetics, Vol. 4(1), pp. 95-104. 1974.

Examples

data("Hepta")
Cls=kmeansClustering(Hepta$Data,ClusterNo = 7,Type="Hartigan")$Cls
ClusterDunnIndex(Cls,Hepta$Data)


data("Hepta")
ClsWellSeperated=kmeansClustering(Hepta$Data,ClusterNo = 7,Type="Steinley")$Cls
ClusterDunnIndex(ClsWellSeperated,Hepta$Data)


FCPS documentation built on Oct. 19, 2023, 5:06 p.m.