Description Usage Arguments Details Value Author(s) Examples
View source: R/gapStatistics.R
gap statistics to tune gamma
1 2 |
d |
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. |
gamma |
Penalty on total number of features. Larger gamma will yeild small number of selected features. |
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. |
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 | set.seed(123)
# Generate two random omics datasets
mu <- c(-3,1,3)
Simu1_mRNA <- rbind(cbind(matrix(rnorm(40*5, mu[1], 0.1),40,5),
matrix(rnorm(40*5, mu[2], 0.1),40,5),
matrix(rnorm(40*5, mu[3], 0.1),40,5)),
matrix(rnorm(10*15,0,0.1),10,15))
mu <- c(1,3,-3)
Simu1_methyl <- rbind(cbind(matrix(rnorm(40*5, mu[1], 0.1),40,5),
matrix(rnorm(40*5, mu[2], 0.1),40,5),
matrix(rnorm(40*5, mu[3], 0.1),40,5)),
matrix(rnorm(10*15,0,0.1),10,15))
## feature modules across two datasets
group <- list(c(1:10,51:60), c(11:20,61:70), c(21:30,71:80), c(31:40,81:90))
DList <- rbind(Simu1_mRNA, Simu1_methyl)
dim(DList)
d <- t(DList)
gapResult <- gapStatistics(d,K=3,B=10,group=group)
print(gapResult)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.