Print a fitted object from the RGCCA package
Source:R/print.rgcca.R
, R/print.rgcca_cv.R
, R/print.rgcca_permutation.R
, and 2 more
print.Rd
`print.rgcca()` prints a fitted RGCCA object. The method and number of components are displayed.
`print.rgcca_cv()` prints a rgcca_cv object. The type of validation, the number of tried parameter sets, the type of task, and the model used are displayed.
`print.rgcca_permutation()` prints a rgcca_permutation object. The number of permutations and tried parameter sets are displayed.
`print.rgcca_bootstrap()` prints a rgcca_bootstrap object. The number of boostrap samples used for fitting is displayed.
`print.rgcca_stability()` prints a rgcca_stability object. The number of boostrap samples used for fitting is displayed.
Arguments
- x
An object to be printed (output of functions
rgcca
,rgcca_cv
,rgcca_permutation
,rgcca_bootstrap
, orrgcca_stability
).- ...
Further arguments passed to other methods.
Examples
## Printing of an rgcca object
data(Russett)
blocks <- list(
agriculture = Russett[, seq(3)],
industry = Russett[, 4:5],
politic = Russett[, 6:8]
)
C <- matrix(c(0, 0, 1, 0, 0, 1, 1, 1, 0), 3, 3)
res <- rgcca(blocks,
connection = C, ncomp = rep(2, 3), tau = c(1, 1, 1),
scheme = "factorial", scale = TRUE, verbose = FALSE
)
print(res)
#> Fitted RGCCA model.
#> The algorithm converged to a stationnary point:
#> - After 2 iterations for component 1.
#> - After 6 iterations for component 2.
## Printing of an rgcca_cv object
res <- rgcca_cv(blocks,
response = 3, method = "rgcca", par_type = "tau",
par_value = c(0, 0.2, 0.3), n_run = 1, n_cores = 1,
verbose = TRUE
)
print(res)
#> RGCCA cross-validation object obtained with 10 sets of parameters using 5 folds.
#> Regression was performed using lm model.
## Printing of an rgcca_permutation object
perm.out <- rgcca_permutation(blocks,
par_type = "tau",
n_perms = 5, n_cores = 1,
verbose = TRUE
)
print(perm.out)
#> RGCCA permutation object obtained with 10 sets of parameters and 5 permutations each.
## Printing of an rgcca_bootstrap object
fit.rgcca <- rgcca(blocks, ncomp = c(2, 1, 2))
boot.out <- rgcca_bootstrap(fit.rgcca, n_boot = 20, n_cores = 2,
verbose = TRUE)
#> Bootstrap samples sanity check...
#> OK
print(boot.out)
#> RGCCA bootstrap object obtained with 20 bootstrap samples.
## Printing of an rgcca_stability object
fit.sgcca <- rgcca(blocks, sparsity = c(.8, .9, .6))
res <- rgcca_stability(fit.sgcca, n_boot = 10, verbose = TRUE)
#> Bootstrap samples sanity check...
#> OK
print(res)
#> RGCCA stability object obtained with 10 bootstrap samples.