plotVarianceExplained: Plot variance explained by the model

Description Usage Arguments Value Examples

View source: R/calculateVarianceExplained.R

Description

Method to plot variance explained (R-squared) by the MOFA model for each view and latent factor.
As a measure of variance explained for gaussian data we adopt the coefficient of determination (R2).
For details on the computation see the help of the calculateVarianceExplained function

Usage

1
plotVarianceExplained(object, cluster = TRUE, ...)

Arguments

object

a MOFAmodel object.

cluster

logical indicating whether to do hierarchical clustering on the plot

...

extra arguments to be passed to calculateVarianceExplained

Value

ggplot object

Examples

1
2
3
4
5
6
7
8
9
# Using an existing trained model on the CLL data
filepath <- system.file("extdata", "CLL_model.hdf5", package = "MOFAdata")
MOFA_CLL <- loadModel(filepath)
plotVarianceExplained(MOFA_CLL)

# Using an existing trained model on the scMT data
filepath <- system.file("extdata", "scMT_model.hdf5", package = "MOFAdata")
MOFA_scMT <- loadModel(filepath)
plotVarianceExplained(MOFA_scMT)

bioFAM/MOFA documentation built on Oct. 3, 2020, 12:53 a.m.