prepare_mofa | R Documentation |
Function to prepare a MOFA
object for training.
It requires defining data, model and training options.
prepare_mofa(
object,
data_options = NULL,
model_options = NULL,
training_options = NULL,
stochastic_options = NULL,
mefisto_options = NULL
)
object |
an untrained |
data_options |
list of data_options (see |
model_options |
list of model options (see |
training_options |
list of training options (see |
stochastic_options |
list of options for stochastic variational inference (see |
mefisto_options |
list of options for mefisto (see |
This function is called after creating a MOFA
object (using create_mofa
)
and before starting the training (using run_mofa
). Here, we can specify different options for
the data (data_options), the model (model_options) and the trainig (training_options, stochastic_options). Take a look at the
individual default options for an overview using the get_default_XXX_options functions above.
Returns an untrained MOFA
with specified options filled in the corresponding slots
# Using an existing simulated data with two groups and two views
file <- system.file("extdata", "test_data.RData", package = "MOFA2")
# Load data dt (in data.frame format)
load(file)
# Create the MOFA object
MOFAmodel <- create_mofa(dt)
# Prepare MOFA object using default options
MOFAmodel <- prepare_mofa(MOFAmodel)
# Prepare MOFA object changing some of the default model options values
model_opts <- get_default_model_options(MOFAmodel)
model_opts$num_factors <- 10
MOFAmodel <- prepare_mofa(MOFAmodel, model_options = model_opts)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.