SSKmeans: SSKmeans

Description Usage Arguments Details Value Author(s) Examples

Description

Smoothed sparse Kmeans

Usage

1
2
SSKmeans(x, K = NULL, lambda1 = 0, lambda2 = 0, E = NULL, nstart = 20,
  silent = FALSE, maxiter = 20)

Arguments

x

a data matrix of dimension n * p, where n is number of samples to be clustered, p is number of features.

K

pre-specified number of clusters

lambda1

tuning parameter for l1 norm lasso penalty. Large lambda1 will induce more feature weights to be 0.

E

network structure. E should be a m by 2 matrix, where m is total number of connections (edges) in the graph. For example, if feature 2 and feature 3 are connected in the graph, E[j,] <- c(2, 3). j = 1, ..., m.

nstart

number of initialization for Kmeans.

silent

if print out progress.

maxiter

max number of iterations.

lambda1

tuning parameter for the smoothness of feature selection. Large lambda will induce feature weights to be similar.

Details

Perform sparse Kmeans to perform sample clustering and feature selection. In feature selection, we also want to incorporate spatio information such that adjacent voxels have similar coefficient.

Value

a list. The following items are included in the list.

ws

weight for each feature. Zero weight means the feature is not selected.

Cs

Cluster Assignment

wcss

within cluster sum of square

crit

objective value

E

network structure

Author(s)

Caleb

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
set.seed(11)
x <- matrix(rnorm(50*70),ncol=70)
x[1:25,1:20] <- x[1:25,1:20]+1
x <- scale(x, TRUE, TRUE)
# choose tuning parameter
lambda1 <- 1
lambda2 <- 1
E <- cbind(1:69,2:70)
K=2
nstart=20
silent=FALSE
maxiter=6

km.out <- SSKmeans(x,K=2,lambda1=1, lambda2=1, E=E)

gatorBiostat/SSKmeans documentation built on May 26, 2019, 11:59 p.m.