Connectivity Index - Internal Measure

Share:

Description

Function evaluates connectivity index.

Usage

1
2
connectivity(data,clust,neighbour.num, dist="euclidean")
connectivity.diss.mx(diss.mx,clust,neighbour.num)

Arguments

data

numeric matrix or data.frame where columns correspond to variables and rows to observations

diss.mx

square, symetric numeric matrix or data.frame, representation of dissimilarity matrix where infomartion about distances between objects is stored.

clust

integer vector with information about cluster id the object is assigned to. If vector is not integer type, it will be coerced with warning.

neighbour.num

value which tells how many nearest neighbors for every object should be checked.

dist

chosen metric: "euclidean" (default value), "manhattan", "correlation" (variable enable only in connectivity function).

Details

For given data and its partitioning connectivity index is computed. For choosen pattern neighbour.num nearest neighbours are found and sorted from closest to most further. Alghorithm checks if those neighbours are assigned to the same cluster. At the beggining connectivity value is equal 0 and increase with value:

1/i when i-th nearest neighbour is not assigned to the same cluster,
0 otherwise.

Procedure is repeated for all patterns which comming from our data set. All values received for particular pattern are added and creates main connectivity index.

Value

connectivity returns a connectivity value.

Author(s)

Lukasz Nieweglowski

References

J. Handl, J. Knowles and D. B. Kell Sumplementary material to computational cluster validation in post-genomic data analysis, http://dbkgroup.org/handl/clustervalidation/supplementary.pdf

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# load and prepare data
library(clv)
data(iris)
iris.data <- iris[,1:4]

# cluster data
pam.mod <- pam(iris.data,5) # create five clusters
v.pred <- as.integer(pam.mod$clustering) # get cluster ids associated to gived data objects

# compute connectivity index using data and its clusterization
conn1 <- connectivity(iris.data, v.pred, 10)
conn2 <- connectivity(iris.data, v.pred, 10, dist="manhattan")
conn3 <- connectivity(iris.data, v.pred, 10, dist="correlation")

# the same using dissimilarity matrix
iris.diss.mx <- as.matrix(daisy(iris.data))
conn4 <- connectivity.diss.mx(iris.diss.mx, v.pred, 10)