Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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.

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, …, C_k such that the criterion function L = ∑_{l=1}^k \min_{j \in C_l} ∑_{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.

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.

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. doi: 10.1007/s003579900034.

See Also

cl_pclust for more general prototype-based partitions of clusterings.

Examples

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))

clue

Cluster Ensembles

v0.3-59
GPL-2
Authors
Kurt Hornik [aut, cre] (<https://orcid.org/0000-0003-4198-9911>), Walter Böhm [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.