federateRCCA | R Documentation |
Perform the regularized canonical correlation analysis for the virtual cohort.
federateRCCA(loginFD,
logins,
func,
symbol,
ncomp = 2,
lambda1 = 0,
lambda2 = 0,
chunk = 500L,
mc.cores = 1,
tune = FALSE,
tune_param = .encode.arg(
list(nfold = 5,
grid1 = seq(0.001, 1, length = 5),
grid2 = seq(0.001, 1, length = 5))))
loginFD |
Login information of the FD server (one of the servers containing cohort data). |
logins |
Login information of servers containing cohort data. |
func |
Encoded definition of a function for preparation of raw data matrices. Two arguments are required: conns (list of Opal connections), symbol (names of the two R symbols) (see datashield.assign). |
symbol |
Encoded vector of names of the two R symbols to assign in the
DataSHIELD R session on each server in |
ncomp |
Number of components (covariates). Default, 2. |
lambda1 |
Non-negative regularized parameter value for first data set. Default, 0. If there are more variables than samples, it should be > 0. |
lambda2 |
Non-negative regularized parameter value for second data set. Default, 0. If there are more variables than samples, it should be > 0. |
chunk |
Size of chunks into what the SSCP matrix is partitioned. Default, 500L. |
mc.cores |
Number of cores for parallel computing. Default, 1. |
tune |
Logical value indicating whether the tuning for lambda values will be performed. Default, FALSE, no tuning. |
tune_param |
Tuning parameters.
|
RCCA object
## Not run:
dataProc <- function(conns, symbol) {
datashield.assign(conns, symbol[1], 'test.CNSIM', variables=c('LAB_TSC', 'LAB_TRIG', 'LAB_HDL'))
datashield.assign(conns, symbol[2], 'test.CNSIM', variables=c('LAB_GLUC_ADJUSTED', 'PM_BMI_CONTINUOUS'))
}
federateRCCA(.encode.arg(loginFD), .encode.arg(logins),
.encode.arg(dataProc, serialize.it = T),
.encode.arg(c("rawDataX", "rawDataY")))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.