interpolate_factors | R Documentation |
Function to interpolate factors in MEFISTO based on new covariate values.
interpolate_factors(object, new_values)
object |
a |
new_values |
a matrix containing the new covariate values to inter/extrapolate to. Should be in the same format as the covariated used for training. |
This function requires the functional MEFISTO framework to be used in training.
Use set_covariates
and specify mefisto_options when preparing the training using prepare_mofa
.
Currenlty, only the mean of the interpolation is provided from R.
Returns the MOFA
with interpolated factor values filled in the corresponding slot (interpolatedZ)
# Using an existing trained model
file <- system.file("extdata", "MEFISTO_model.hdf5", package = "MOFA2")
model <- load_model(file)
model <- interpolate_factors(model, new_values = seq(0,1.1,0.01))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.