plot_weights_heatmap: Plot heatmap of the weights

Description Usage Arguments Value Examples

View source: R/plot_weights.R

Description

Function to visualize the weights for a given set of factors in a given view.
This is useful to visualize the overall pattern of the weights but not to individually characterise the factors.
To inspect the weights of individual factors, use the functions plot_weights and plot_top_weights

Usage

1
2
3
4
5
6
7
8
plot_weights_heatmap(
  object,
  view = 1,
  features = "all",
  factors = "all",
  threshold = 0,
  ...
)

Arguments

object

a trained MOFA object.

view

character vector with the view name(s), or numeric vector with the index of the view(s) to use. Default is the first view.

features

character vector with the feature name(s), or numeric vector with the index of the feature(s) to use. Default is 'all'.

factors

character vector with the factor name(s), or numeric vector with the index of the factor(s) to use. Default is 'all'.

threshold

threshold on absolute weight values, so that weights with a magnitude below this threshold (in all factors) are removed

...

extra arguments passed to pheatmap.

Value

A pheatmap object

Examples

1
2
3
4
# Using an existing trained model on simulated data
file <- system.file("extdata", "model.hdf5", package = "MOFA2")
model <- load_model(file)
plot_weights_heatmap(model)

MOFA2 documentation built on Nov. 8, 2020, 7:28 p.m.