kmpp {kpodclustr}R Documentation

k-means++

Description

kmpp Computes initial centroids via kmeans++

Usage

kmpp(X, k)

Arguments

X

Data matrix whose rows are observations and columns are features

k

Number of clusters.

Value

A data matrix whose rows contain initial centroids for the k clusters

Examples

n <- 10
p <- 2
X <- matrix(rnorm(n*p),n,p)
k <- 3
kmpp(X,k)


[Package kpodclustr version 1.1 Index]