Description Usage Arguments Value Examples
View source: R/compareModels.R
Different objects of MOFAmodel
are compared in terms
of the final value of the ELBO statistics.
For model selection the model with the highest ELBO value is selected.
The height of the bar indicates the number of inferred factors and
the color of the bar the value of the ELBO statistic.
1 | compareModels(models, show_modelnames = FALSE)
|
models |
a list containing |
show_modelnames |
boolean, whether to indicate the name of each model instance (names of the list in models) or not |
a ggplot showing the number of factors and the ELBO statistics of the given models as a barplot
1 2 3 4 5 6 7 8 9 10 11 | ### Example on simulated data
# Simulate Data
data <- makeExampleData()
# Create MOFA model
MOFAobject <- createMOFAobject(data)
# Prepare MOFA model
MOFAobject <- prepareMOFA(MOFAobject)
# Train several instances of MOFA models
n_inits <- 3
MOFAlist <- lapply(seq_len(n_inits), function(i) runMOFA(MOFAobject, outfile=tempfile()))
compareModels(MOFAlist)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.