powered by
kmpp Computes initial centroids via kmeans++
kmpp
kmpp(X, k)
Data matrix whose rows are observations and columns are features
Number of clusters.
A data matrix whose rows contain initial centroids for the k clusters
# NOT RUN { n <- 10 p <- 2 X <- matrix(rnorm(n*p),n,p) k <- 3 kmpp(X,k) # }
Run the code above in your browser using DataLab