top_weights

Contents

top_weights#

mofaflex.pl.top_weights(model, n_features=10, views=None, factors=None, figsize=(5, 5), nrow=None, ncol=None)#

Plot the top weights for a given factor and view.

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

  • n_features (int (default: 10)) – Number of top features to plot.

  • views (str | Sequence[str] | None (default: None)) – The views to consider in the ranking. If None, plot all views.

  • factors (int | str | Sequence[int] | Sequence[str] | None (default: None)) – The factors to plot. If None, plot all factors.

  • figsize (tuple[int, int] (default: (5, 5))) – Figure size in inches.

  • nrow (int | None (default: None)) – Number of rows in the faceted plot. If None, plotnine will determine automatically.

  • ncol (int | None (default: None)) – Number of columns in the faceted plot. If None, plotnine will determine automatically.

Return type:

plotnine.ggplot