Learn R Programming

fpc (version 2.2-3)

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(d,k)

Arguments

d

dist-object or dissimilarity matrix.

k

integer. Number of clusters.

Value

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

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

See Also

stupidknn

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