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

View source: R/compare_models.R

compare_elboR Documentation

Compare different trained MOFA objects in terms of the final value of the ELBO statistics and number of inferred factors

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

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

# 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))

bioFAM/MOFA2 documentation built on June 12, 2024, 3:57 p.m.