mofaflex.pl.variance_explained

mofaflex.pl.variance_explained#

mofaflex.pl.variance_explained(model, group_by='group', term=None, figsize=None)#

Plot the fraction of variance explained per factor in each group and view.

Parameters:
  • model (MOFAFLEX) – The MOFA-FLEX model.

  • group_by (Literal['group', 'view'] (default: 'group')) – The grouping to use for the plots.

  • term (str | None (default: None)) – The name of the additive term to plot the variance explained for. If None and the model has only one additive term, will plot the fraction of variance explained per factor for this term. If None and the model has multiple terms, will plot the fraction of variance explained per term.

  • figsize (tuple[float, float] | None (default: None)) – Figure size in inches.

Return type:

plotnine.ggplot