clustIndex {cclust} | R Documentation |
Cluster Indexes
Description
y
is the result of a clustering algorithm of class such
as "cclust"
.
This function is calculating the values of several clustering
indexes. The values of the indexes can be independently used in order
to determine the number of clusters existing in a data set.
Usage
clustIndex ( y, x, index = "all" )
Arguments
y |
Object of class |
x |
Data matrix where columns correspond to variables and rows to observations |
index |
The indexes that are calculated |
Details
The description of the indexes is categorized into 3 groups, based on the statistics mainly used to compute them.
The first group is based on the sum of squares within ()
and between (
) the clusters. These statistics measure the
dispersion of the data points in a cluster and between the clusters
respectively. These indexes are:
- calinski:
-
, where
is the number of data points and
is the number of clusters.
- hartigan:
then
.
- ratkowsky:
-
, where
stands for the
for every variable and
for the total sum of squares for every variable.
- ball:
-
, where
is the number of clusters.
The second group is based on the statistics of , i.e., the
scatter matrix of the data points, and
, which is the sum of the
scatter matrices in every group. These indexes are:
- scott:
-
, where
is the number of data points and
stands for the determinant of a matrix.
- marriot:
-
, where
is the number of clusters.
- trcovw:
.
- tracew:
.
- friedman:
-
, where
is the scatter matrix of the cluster centers.
- rubin:
.
The third group consists of four algorithms not belonging to the previous ones and not having anything in common.
- cindex:
-
if the data set is binary, then while the C-Index is a cluster similarity measure, is expressed as:
, where
is the sum of all
within cluster distances,
is the sum of the
smallest pairwise distances in the data set, and
is the sum of the
biggest pairwise distances. In order to compute the C-Index all pairwise distances in the data set have to be computed and stored. In the case of binary data, the storage of the distances is creating no problems since there are only a few possible distances. However, the computation of all distances can make this index prohibitive for large data sets.
- db:
-
where
stands for the maximum value of
for
, and
for
, where
is the distance between the centers of two clusters
.
- likelihood:
-
under the assumption of independence of the variables within a cluster, a cluster solution can be regarded as a mixture model for the data, where the cluster centers give the probabilities for each variable to be
. Therefore, the negative Log-likelihood can be computed and used as a quantity measure for a cluster solution. Note that the assumptions for applying special penalty terms, like in AIC or BIC, are not fulfilled in this model, and also they show no effect for these data sets.
- ssi:
this “Simple Structure Index” combines three elements which influence the interpretability of a solution, i.e., the maximum difference of each variable between the clusters, the sizes of the most contrasting clusters and the deviation of a variable in the cluster centers compared to its overall mean. These three elements are multiplicatively combined and normalized to give a value between
and
.
Value
Returns an vector with the indexes values.
Author(s)
Evgenia Dimitriadou and Andreas Weingessel
References
Andreas Weingessel, Evgenia Dimitriadou and Sara Dolnicar,
An Examination Of Indexes For Determining The Number
Of Clusters In Binary Data Sets,
https://epub.wu.ac.at/1542/
and the references therein.
See Also
Examples
# a 2-dimensional example
x<-rbind(matrix(rnorm(100,sd=0.3),ncol=2),
matrix(rnorm(100,mean=1,sd=0.3),ncol=2))
cl<-cclust(x,2,20,verbose=TRUE,method="kmeans")
resultindexes <- clustIndex(cl,x, index="all")
resultindexes