compare_elbo: Compare different trained 'MOFA' objects in terms of the...

Description Usage Arguments Value Examples

View source: R/compare_models.R

Description

Different objects of MOFA are compared in terms of the final value of the ELBO statistics. For model selection the model with the highest ELBO value is selected.

Usage

1
compare_elbo(models, log = FALSE, return_data = FALSE)

Arguments

models

a list containing MOFA objects.

log

logical indicating whether to plot the log of the ELBO.

return_data

logical indicating whether to return a data.frame with the ELBO values per model

Value

A ggplot object or the underlying data.frame if return_data is TRUE

Examples

1
2
3
4
5
6
7
# Using an existing trained model on simulated data
file <- system.file("extdata", "model.hdf5", package = "MOFA2")
model1 <- load_model(file)
model2 <- load_model(file)

# Compare ELBO between models
## Not run: compare_elbo(list(model1,model2))

MOFA2 documentation built on Nov. 8, 2020, 7:28 p.m.