Last updated: 2018-03-06
Code version: e16e34a
R.matlab v3.6.1 (2016-10-19) successfully loaded. See ?R.matlab for help.
Attaching package: 'R.matlab'
The following objects are masked from 'package:base':
getOption, isOpen
Brain Tumor data:
The data consist of micro array gene expression measurements on 43 brain tumors of four types, together with 356 additional variables related to the expression data. We pre-processed the data by centering the data by column.
data = readMat('../data/BrainTumor.mat')
data = data$Y
Flash:
flash.data = flash_set_data(data)
f = flash(flash.data, greedy = TRUE, backfit = TRUE)
saveRDS(f, '../output/BrainTumorVarCol.rds')
Factors = flash_get_ldf(fmodel)$f
pve.order = order(flash_get_pve(fmodel), decreasing = TRUE)
par(mar=c(1,1,1,1))
par(mfrow=c(3,2))
for(i in pve.order){
barplot(Factors[,i], main=paste0('Factor ',i, ' pve= ', round(flash_get_pve(fmodel)[i],3)), las=2, cex.names = 0.4, names="")
}
Flash again on the loading matrix
flash.loading = flash_set_data(fmodel$EL[,1:9])
flmodel = flash(flash.loading, greedy = TRUE, backfit = TRUE)
fitting factor/loading 1
The flash prefers the rank 0 model. There is no hidden structure in the loading matrix.
sessionInfo()
R version 3.4.3 (2017-11-30)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS High Sierra 10.13.3
Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] R.matlab_3.6.1 flashr_0.5-6
loaded via a namespace (and not attached):
[1] Rcpp_0.12.15 compiler_3.4.3 git2r_0.20.0
[4] plyr_1.8.4 R.utils_2.6.0 R.methodsS3_1.7.1
[7] iterators_1.0.9 tools_3.4.3 digest_0.6.13
[10] evaluate_0.10.1 tibble_1.3.4 gtable_0.2.0
[13] lattice_0.20-35 rlang_0.1.6 Matrix_1.2-12
[16] foreach_1.4.4 yaml_2.1.17 parallel_3.4.3
[19] ebnm_0.1-10 stringr_1.3.0 knitr_1.20
[22] rprojroot_1.2 grid_3.4.3 rmarkdown_1.8
[25] ggplot2_2.2.1 ashr_2.2-7 magrittr_1.5
[28] backports_1.1.2 scales_0.5.0 codetools_0.2-15
[31] htmltools_0.3.6 MASS_7.3-47 assertthat_0.2.0
[34] softImpute_1.4 colorspace_1.3-2 stringi_1.1.6
[37] lazyeval_0.2.1 pscl_1.5.2 doParallel_1.0.11
[40] munsell_0.4.3 truncnorm_1.0-8 SQUAREM_2017.10-1
[43] R.oo_1.21.0
This R Markdown site was created with workflowr