aggExCluster
performs agglomerative clustering.
Unlike other methods, e.g., the ones implemented in hclust
,
aggExCluster
is computing exemplars for each cluster and
its merging objective is geared towards the identification of
meaningful exemplars, too.
For each pair of clusters, the merging objective is computed as
follows:
An intermediate cluster is created as the union
of the two clusters.
The potential exemplar is selected from the intermediate
cluster as the sample that has the largest average similarity
to all other samples in the intermediate cluster.
Then the average similarity of the exemplar with all
samples in the first cluster and the average similarity with
all samples in the second cluster is computed. These two values
measure how well the joint exemplar describes the samples in the
two clusters.
The merging objective is finally computed as the
average of the two measures above. Hence, we can consider the
merging objective as some kind of “balanced average
similarity to the joint exemplar”.
In each step, all pairs of clusters are considered and
the pair with the largest merging objective is actually merged.
The joint exemplar is then chosen as the exemplar of the merged
cluster.
aggExCluster
can be used in two ways, either by performing
agglomerative clustering of an entire data set or by performing
agglomerative clustering of data previously clustered by
affinity propagation or another clustering algorithm.
Agglomerative clustering of an entire data set can be
accomplished either by calling aggExCluster
on a
quadratic similarity matrix without further argument or by
calling aggExCluster
for a function or function name
along with data to be clustered (as argument x
).
A full agglomeration run is performed that starts from l
clusters (all samples in separate one-element clusters) and ends
with one cluster (all samples in one single cluster).
Agglomerative clustering starting from a given clustering
result can be accomplished by calling aggExCluster
for
an APResult
or ExClust
object passed as parameter x
. The similarity matrix
can either be passed as argument s
or, if missing,
aggExCluster
looks if the similarity matrix is
included in the clustering object x
. A cluster hierarchy
with numbers of clusters ranging from the
number of clusters in x
down to 1 is created.
The result is stored in an AggExResult
object.
The slot height
is filled with the merging
objective of each of the maxNoClusters-1
merges. The slot
order
contains a permutation of the samples/clusters for
dendrogram plotting. The algorithm for computing this permutation
is the same as the one used in hclust
. If aggExCluster
was called for an entire data set, the slot label
contains the names of the objects to be clustered (if available,
otherwise the indices are used). If aggExCluster
was called
for a prior clustering, then labels are set to ‘Cluster 1’,
‘Cluster 2’, etc.