kpod: Function for performing k-POD

Description Usage Arguments Value Author(s) Examples

View source: R/kpodclustr-package.r

Description

kpod Function for performing k-POD, a method for k-means clustering on partially observed data

Usage

1
kpod(X, k, kmpp_flag = TRUE, maxiter = 100)

Arguments

X

Data matrix containing missing entries whose rows are observations and columns are features

k

Number of clusters

kmpp_flag

(Optional) Indicator for whether or not to initialize with k-means++

maxiter

(Optional) Maximum number of iterations

Value

cluster: Clustering assignment obtained with k-POD

cluster_list: List containing clustering assignments obtained in each iteration

obj_vals: List containing the k-means objective function in each iteration

fit: Fit of clustering assignment obtained with k-POD (calculated as 1-(total withinss/totss))

fit_list: List containing fit of clustering assignment obtained in each iteration

Author(s)

Jocelyn T. Chi

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
p <- 5
n <- 200
k <- 3
sigma <- 0.15
missing <- 0.20
Data <- makeData(p,n,k,sigma,missing)
X <- Data$Missing
Orig <- Data$Orig
truth <- Data$truth

kpod_result <- kpod(X,k)
kpodclusters <- kpod_result$cluster

kpodclustr documentation built on July 8, 2020, 5:43 p.m.

Related to kpod in kpodclustr...