fpc (version 2.2-7)

stupidkcentroids: Stupid k-centroids random clustering

Description

Picks k random centroids from given dataset and assigns every point to closest centroid. This is called stupid k-centroids in Hennig (2017).

Usage

stupidkcentroids(xdata, k, distances = inherits(xdata, "dist"))

Arguments

xdata

cases*variables data, dist-object or dissimilarity matrix, see distances.

k

integer. Number of clusters.

distances

logical. If TRUE, xdata is interpreted as distances.

Value

The clustering vector (values 1 to k, length number of objects behind xdata),

References

Hennig, C. (2017) Cluster validation by measurement of clustering characteristics relevant to the user. In C. H. Skiadas (ed.) Proceedings of ASMDA 2017, 501-520, https://arxiv.org/abs/1703.09282

Akhanli, S. and Hennig, C. (2020) Calibrating and aggregating cluster validity indexes for context-adapted comparison of clusterings. Accepted for publication by Statistics and Computing, https://arxiv.org/abs/2002.01822

See Also

stupidknn, stupidkfn, stupidkaven

Examples

Run this code
# NOT RUN {
  set.seed(20000)
  options(digits=3)
  face <- rFace(200,dMoNo=2,dNoEy=0,p=2)
  stupidkcentroids(dist(face),3) 
# }

Run the code above in your browser using DataLab