if (FALSE) {
###########################
# stability and bootstrap #
###########################
data("ge_cgh_locIGR", package = "gliomaData")
blocks <- ge_cgh_locIGR$multiblocks
Loc <- factor(ge_cgh_locIGR$y)
levels(Loc) <- colnames(ge_cgh_locIGR$multiblocks$y)
blocks[[3]] <- Loc
fit_sgcca <- rgcca(blocks,
sparsity = c(.071, .2, 1),
ncomp = c(1, 1, 1),
scheme = "centroid",
verbose = TRUE, response = 3
)
boot_out <- rgcca_bootstrap(fit_sgcca, n_boot = 100, n_cores = 1)
fit_stab <- rgcca_stability(fit_sgcca,
keep = sapply(fit_sgcca$a, function(x) mean(x != 0)),
n_cores = 1, n_boot = 10,
verbose = TRUE
)
boot_out <- rgcca_bootstrap(
fit_stab, n_boot = 500, n_cores = 1, verbose = TRUE
)
plot(boot_out, block = 1:2, n_mark = 2000, display_order = FALSE)
}
Run the code above in your browser using DataLab