stupidkcentroids {fpc}R Documentation

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 (2019).

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

A list with components

partition

vector if integers 1 to k, of length equal to number of objects, indicates to which cluster an object belongs.

centroids

vector of integers of length k, indicating the centroids of the clusters (observation number).

distances

as argument distances.

Author(s)

Christian Hennig christian.hennig@unibo.it https://www.unibo.it/sitoweb/christian.hennig/en/

References

Hennig, C. (2019) Cluster validation by measurement of clustering characteristics relevant to the user. In C. H. Skiadas (ed.) Data Analysis and Applications 1: Clustering and Regression, Modeling-estimating, Forecasting and Data Mining, Volume 2, Wiley, New York 1-24, https://arxiv.org/abs/1703.09282

Akhanli, S. and Hennig, C. (2020) Calibrating and aggregating cluster validity indexes for context-adapted comparison of clusterings. Statistics and Computing, 30, 1523-1544, https://link.springer.com/article/10.1007/s11222-020-09958-2, https://arxiv.org/abs/2002.01822

See Also

stupidknn, stupidkfn, stupidkaven

Examples

  set.seed(20000)
  options(digits=3)
  face <- rFace(200,dMoNo=2,dNoEy=0,p=2)
  stupidkcentroids(dist(face),3) 

[Package fpc version 2.2-12 Index]