Description Usage Arguments Details Value Author(s) Examples
gap statistics to tune gamma
1 2 | gapStatistics(d, K = 3, B = 10, gammas = NULL, alpha = 1,
group = NULL, seed = 15213, silence = FALSE)
|
d |
A list of S studies, each study is a combined data matrix n*J, where n is number of subjects, J=J1+J2+... and J1 is number of features in omics dataset 1 and J2 is number of features in omics dataset 2... |
K |
number of clusters |
B |
number of permutations. |
alpha |
balance between group sparsity and individual sparsity. alpha=1 yeilds no group sparsity. alpha=0 yeilds no individual penalty. |
group |
Prior group information. Potentially these group can contain overlap features. group is a list and each element of the list is feature index. |
seed |
random seed |
silence |
do not print progress in silence = TRUE. |
gamma |
Penalty on total number of features. Default is given. Larger gamma will yeild small number of selected features. |
gap statistics to tune gamma, the tuning parameter to control number of features.
a table. Each row represents a gamma.
gamma |
input gammas |
score |
objective score: see obj0 in ISKmeans function |
E.score |
mean value of permutated score |
se.score |
standard error of permutated score |
gapStat |
gap statistics, score - E.score |
numF |
number of selected features |
Caleb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | S <- 2
K <- 3
G <- 1000
g1 <- 50
g2 <- 50
n0 <- 20
n <- K*n0
labels <- cut(1:n,breaks=K,labels=FALSE)
set.seed(32611)
S1 <- matrix(rnorm(G*n), nrow=G, ncol=n)
S2 <- matrix(rnorm(G*n), nrow=G, ncol=n)
S1[1:g1, labels==1] <- S1[1:g1, labels==1] + 2
S1[1:g1, labels==3] <- S1[1:g1, labels==3] - 2
S1[g1 + 1:g2, labels==1] <- S1[g1 + 1:g2, labels==1] - 2
S1[g1 + 1:g2, labels==2] <- S1[g1 + 1:g2, labels==2] + 2
S2[1:g1, labels==2] <- S2[1:g1, labels==2] + 2
S2[1:g1, labels==1] <- S2[1:g1, labels==1] - 2
S2[g1 + 1:g2, labels==2] <- S2[g1 + 1:g2, labels==2] - 2
S2[g1 + 1:g2, labels==3] <- S2[g1 + 1:g2, labels==3] + 2
S = list(t(S1),t(S2))
groups <- Map('c',1:g1,g1 + 1:g2)
gapResult <- gapStatistics(d=S,K=3,B=10,group=groups)
print(gapResult)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.