wkm function

Weighted K-means

Weighted K-means

Weighted K-means via Lloyd's algorithm

wkm( x, mu, data, weights = rep(1, NROW(x)), iter.max = 20, n.start = 5, init = "kmpp", ... )

Arguments

  • x: Data (or formula)
  • mu: Initial centers (or number centers chosen randomly among x)
  • data: optional data frmae
  • weights: Optional weights
  • iter.max: Max number of iterations
  • n.start: Number of restarts
  • init: method to create initial centres (default kmeans++)
  • ...: Additional arguments to lower level functions

Author(s)

Klaus K. Holst

  • Maintainer: Klaus K. Holst
  • License: GPL-3
  • Last published: 2025-01-12