Clest {RSKC} | R Documentation |
An implementation of Clest with robust sparse K-means. CER is used as a similarity measure.
Description
The function Clest
performs Clest ( Dudoit and Fridlyand (2002)) with CER as the measure of the agreement between two partitions (in each training set).
The following clustering algorithm can be used: K-means, trimmed K-means, sparse K-means and robust sparse K-means.
Usage
Clest(d, maxK, alpha, B = 15, B0 = 5, nstart = 1000,
L1 = 6, beta = 0.1, pca = TRUE, silent=FALSE)
Arguments
d |
A numerical data matrix ( |
maxK |
The maximum number of clusters that you suspect. |
alpha |
See |
B |
The number of times that an observed dataset |
B0 |
The number of times that the reference dataset is generated. |
nstart |
The number of random initial sets of cluster centers at Step(a) of robust sparse K-means clustering. |
L1 |
See |
beta |
0 <= |
pca |
Logical, if |
silent |
Logical, if |
Value
K |
The solution of Clest; the estimated number of clusters. |
result.table |
A real matrix ( |
referenceCERs |
A matrix ( |
observedCERs |
A matrix ( |
call |
The matched call. |
Author(s)
Yumi Kondo <y.kondo@stat.ubc.ca>
References
Yumi Kondo (2011), Robustificaiton of the sparse K-means clustering algorithm, MSc. Thesis, University of British Columbia http://hdl.handle.net/2429/37093
S. Dudoit and J. Fridlyand. A prediction-based resampling method for estimating the number of clusters in a dataset. Genome Biology, 3(7), 2002.
Examples
## Not run:
# little simulation function
sim <-
function(mu,f){
D<-matrix(rnorm(60*f),60,f)
D[1:20,1:50]<-D[1:20,1:50]+mu
D[21:40,1:50]<-D[21:40,1:50]-mu
return(D)
}
set.seed(1)
d<-sim(1.5,100); # non contaminated dataset with noise variables
# Clest with robust sparse K-means
rsk<-Clest(d,5,alpha=1/20,B=3,B0=10, beta = 0.05, nstart=100,pca=TRUE,L1=3,silent=TRUE);
# Clest with K-means
k<-Clest(d,5,alpha=0,B=3,B0=10, beta = 0.05, nstart=100,pca=TRUE,L1=NULL,silent=TRUE);
## End(Not run)