get_imputed_data {MOFA2} | R Documentation |
Function to get the imputed data. It requires the previous use of the impute
method.
get_imputed_data( object, views = "all", groups = "all", features = "all", as.data.frame = FALSE )
object |
a trained |
views |
character vector with the view name(s), or numeric vector with the view index(es). Default is "all". |
groups |
character vector with the group name(s), or numeric vector with the group index(es). Default is "all". |
features |
list of character vectors with the feature names or list of numeric vectors with the feature indices. Default is "all". |
as.data.frame |
logical indicating whether to return a long-formatted data frame instead of a list of matrices.
Default is |
Data is imputed from the generative model of MOFA.
A list containing the imputed valued or a data.frame if as.data.frame is TRUE
# Using an existing trained model file <- system.file("extdata", "model.hdf5", package = "MOFA2") model <- load_model(file) model <- impute(model) imputed <- get_imputed_data(model)