compare_factors: Plot the correlation of factors between different models

View source: R/compare_models.R

compare_factorsR Documentation

Plot the correlation of factors between different models

Description

Different MOFA objects are compared in terms of correlation between their factors.

Usage

compare_factors(models, ...)

Arguments

models

a list with MOFA objects.

...

extra arguments passed to pheatmap

Details

If assessing model robustness across trials, the output should look like a block diagonal matrix, suggesting that all factors are robustly detected in all model instances.

Value

Plots a heatmap of the Pearson correlation between latent factors across all input models.

Examples

# Using an existing trained model on simulated data
file <- system.file("extdata", "model.hdf5", package = "MOFA2")
model1 <- load_model(file)
model2 <- load_model(file)

# Compare factors between models
compare_factors(list(model1,model2))

bioFAM/MOFA2 documentation built on June 12, 2024, 3:57 p.m.