load_model | R Documentation |
Method to load a trained MOFA
The training of mofa is done using a Python framework, and the model output is saved as an .hdf5 file, which has to be loaded in the R package.
load_model(
file,
sort_factors = TRUE,
on_disk = FALSE,
load_data = TRUE,
remove_outliers = FALSE,
remove_inactive_factors = TRUE,
verbose = FALSE,
load_interpol_Z = FALSE
)
file |
an hdf5 file saved by the mofa Python framework |
sort_factors |
logical indicating whether factors should be sorted by variance explained (default is TRUE) |
on_disk |
logical indicating whether to work from memory (FALSE) or disk (TRUE). |
load_data |
logical indicating whether to load the training data (default is TRUE, it can be memory expensive) |
remove_outliers |
logical indicating whether to mask outlier values. |
remove_inactive_factors |
logical indicating whether to remove inactive factors from the model. |
verbose |
logical indicating whether to print verbose output (default is FALSE) |
load_interpol_Z |
(MEFISTO) logical indicating whether to load predictions for factor values based on latent processed (only relevant for models trained with covariates and Gaussian processes, where prediction was enabled) |
a MOFA
model
#' # Using an existing trained model on simulated data
file <- system.file("extdata", "model.hdf5", package = "MOFA2")
model <- load_model(file)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.