Description Usage Arguments Value Examples
View source: R/calculate_variance_explained.R
Plot variance explained by the model for a set of features
Returns a tile plot with a group on the X axis and a feature along the Y axis
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
object |
a |
view |
a view name or index. |
features |
a vector with indices or names for features from the respective view, or number of top features to be fetched by their loadings across specified factors. "all" to plot all features. |
split_by_factor |
logical indicating whether to split R2 per factor or plot R2 jointly |
group_features_by |
column name of features metadata to group features by |
groups |
a vector with indices or names for sample groups (default is all) |
factors |
a vector with indices or names for factors (default is all) |
min_r2 |
minimum variance explained for the color scheme (default is 0). |
max_r2 |
maximum variance explained for the color scheme. |
legend |
logical indicating whether to add a legend to the plot (default is TRUE). |
return_data |
logical indicating whether to return the data frame to plot instead of plotting |
... |
extra arguments to be passed to |
ggplot object
1 2 3 4 | # Using an existing trained model
file <- system.file("extdata", "model.hdf5", package = "MOFA2")
model <- load_model(file)
plot_variance_explained_per_feature(model, view = 1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.