init.centers: Center initialization

Description Usage Arguments Value Examples

View source: R/init.centers.R

Description

Creates a matrix of k points (centers) based on a given matrix of points. One of two method can be used: Kmeans++ centers initialization method or a random choice of data points.

Usage

1
init.centers(x, k, method = c("kmeans++", "random"))

Arguments

x

Dataset as a matrix of n-dimensional points.

k

Number of points (centers) to generate.

method

Generation method. Possible values are: "kmeans++", "random.points".

Value

Matrix points (centers) with k rows.

Examples

1
2
m = matrix(runif(3000), 1000, 3)
init.centers(m, 3, method = "km")

CEC documentation built on Sept. 21, 2021, 5:07 p.m.