Davies_Bouldin: Davies-Bouldin Index - Internal Measure

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Function computes Dunn index - internal measure for given data and its partitioning.

Usage

1
clv.Davies.Bouldin( index.list, intracls, intercls)

Arguments

index.list

object returned by function cls.scatt.data or cls.scatt.diss.mx.

intracls

string vector containing one or more names of intra cluster distances. Available are:

1. if index.list is produced by cls.scatt.data: complete | average | centroid,
2. if index.list is produced by cls.scatt.diss.mx: complete | average.
intercls

string vector containing one or more names of inter cluster diameters. Available are:

1. if index.list is produced by cls.scatt.data: single | complete | average | centroid | aveToCent | hausdorff.
2. if index.list is produced by cls.scatt.diss.mx: single | complete | average | hausdorff.

Details

Davies-Bouldin index is given by equation:

DB = (1/|C|) sum{forall i in 1:|C|} max[ i != j ] { (diam(Ci) + diam(Cj))/dist(Ci,Cj) }

i,j - numbers of clusters which come from the same partitioning,
dist(Ck,Cl) - inter cluster distance between clusters Ck and Cl,
diam(Cm) - intra cluster diameter computed for cluster Cm,
|C| - number of clusters.

Value

As output user gets the matrix of Davies-Bouldin indices. Matrix dimension depends on how many diam and dist measures are chosen by the user, normally dim(D)=c(length(intercls),length(intracls)). Each pair: (inter-cluster dist, intra-cluster diam) have its own position in result matrix.

Author(s)

Lukasz Nieweglowski

References

M. Halkidi, Y. Batistakis, M. Vazirgiannis Clustering Validity Checking Methods : Part II, http://citeseer.ist.psu.edu/537304.html

See Also

Functions which produce index.list input argument: cls.scatt.data, cls.scatt.diss.mx. Related functions: clv.Dunn.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# load and prepare data
library(clv)
data(iris)
iris.data <- iris[,1:4]

# cluster data
agnes.mod <- agnes(iris.data) # create cluster tree 
v.pred <- as.integer(cutree(agnes.mod,5)) # "cut" the tree 

intraclust = c("complete","average","centroid")
interclust = c("single", "complete", "average","centroid", "aveToCent", "hausdorff")

# compute Davies-Bouldin indicies (also Dunn indicies)
# 1. optimal solution:

# compute intercluster distances and intracluster diameters
cls.scatt <- cls.scatt.data(iris.data, v.pred, dist="manhattan")

# once computed valuse use in both functions
dunn1 <- clv.Dunn(cls.scatt, intraclust, interclust)
davies1 <- clv.Davies.Bouldin(cls.scatt, intraclust, interclust)

# 2. functional solution:

# define new Dunn and Davies.Bouldin functions
Dunn <- function(data,clust) 
  clv.Dunn( cls.scatt.data(data,clust),
     intracls = c("complete","average","centroid"), 
     intercls = c("single", "complete", "average","centroid", "aveToCent", "hausdorff")
  )
Davies.Bouldin <- function(data,clust) 
  clv.Davies.Bouldin( cls.scatt.data(data,clust),
    intracls = c("complete","average","centroid"),
    intercls = c("single", "complete", "average","centroid", "aveToCent", "hausdorff")
  )

# compute indicies
dunn2 <- Dunn(iris.data, v.pred)
davies2 <- Davies.Bouldin(iris.data, v.pred)


Search within the clv package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.