assign_clustpp {kpodclustr} | R Documentation |
Function for assigning clusters to rows in a matrix
Description
assign_clustpp
Function for assigning clusters to rows in a matrix
Usage
assign_clustpp(X, init_centers, kmpp_flag = TRUE, max_iter = 20)
Arguments
X |
Data matrix containing missing entries whose rows are observations and columns are features |
init_centers |
Centers for initializing k-means |
kmpp_flag |
(Optional) Indicator for whether or not to initialize with k-means++ |
max_iter |
(Optional) Maximum number of iterations |
Author(s)
Jocelyn T. Chi
Examples
p <- 2
n <- 100
k <- 3
sigma <- 0.25
missing <- 0.05
Data <- makeData(p,n,k,sigma,missing)
X <- Data$Missing
Orig <- Data$Orig
clusts <- assign_clustpp(Orig, k)
[Package kpodclustr version 1.1 Index]