clue (version 0.3-58)

cl_pam: K-Medoids Partitions of Clusterings

Description

Compute \(k\)-medoids partitions of clusterings.

Usage

cl_pam(x, k, method = "euclidean", solver = c("pam", "kmedoids"))

Arguments

x

an ensemble of partitions or hierarchies, or something coercible to that (see cl_ensemble).

k

an integer giving the number of classes to be used in the partition.

method

a character string or a function, as for argument method of function cl_dissimilarity.

solver

a character string indicating the \(k\)-medoids solver to be employed. May be abbreviated. If "pam" (default), the Partitioning Around Medoids (Kaufman & Rousseeuw (1990), Chapter 2) heuristic pam of package cluster is used. Otherwise, the exact algorithm of kmedoids is employed.

Value

An object of class "cl_pam" representing the obtained “secondary” partition, which is a list with the following components.

cluster

the class ids of the partition.

medoid_ids

the indices of the medoids.

prototypes

a cluster ensemble with the \(k\) prototypes (medoids).

criterion

the value of the criterion function of the partition.

description

a character string indicating the dissimilarity method employed.

Details

An optimal \(k\)-medoids partition of the given cluster ensemble is defined as a partition of the objects \(x_i\) (the elements of the ensemble) into \(k\) classes \(C_1, \ldots, C_k\) such that the criterion function \(L = \sum_{l=1}^k \min_{j \in C_l} \sum_{i \in C_l} d(x_i, x_j)\) is minimized.

Such secondary partitions (e.g., Gordon & Vichi, 1998) are obtained by computing the dissimilarities \(d\) of the objects in the ensemble for the given dissimilarity method, and applying a dissimilarity-based \(k\)-medoids solver to \(d\).

References

L. Kaufman and P. J. Rousseeuw (1990). Finding Groups in Data: An Introduction to Cluster Analysis. Wiley, New York.

A. D. Gordon and M. Vichi (1998). Partitions of partitions. Journal of Classification, 15, 265--285. 10.1007/s003579900034.

See Also

cl_pclust for more general prototype-based partitions of clusterings.

Examples

Run this code
# NOT RUN {
data("Kinship82")
party <- cl_pam(Kinship82, 3, "symdiff")
## Compare results with tables 5 and 6 in Gordon & Vichi (1998).
party
lapply(cl_prototypes(party), cl_classes)
table(cl_class_ids(party))
# }

Run the code above in your browser using DataCamp Workspace