Function to obtain the default data options.
This function provides a default set of data options that can be modified and passed to the
prepare_mofa step (see example), i.e. after creating a
create_mofa) and before starting the training (using
The data options are the following:
scale_views: logical indicating whether to scale views to have the same unit variance. As long as the scale differences between the views is not too high, this is not required. Default is FALSE.
scale_groups: logical indicating whether to scale groups to have the same unit variance. As long as the scale differences between the groups is not too high, this is not required. Default is FALSE.
Returns a list with the default data options.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
# 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) # Load default data options data_opts <- get_default_data_options(MOFAmodel) # Edit some of the data options data_opts$scale_views <- TRUE # Prepare the MOFA object MOFAmodel <- prepare_mofa(MOFAmodel, data_options = data_opts)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.