partipy.plot_IC

Contents

partipy.plot_IC#

partipy.plot_IC(adata, result_filters=None)#

Generate a plot showing an information criteria for a range of archetypes.

This function creates a plot showing the variance explained by AA models with different numbers of archetypes. Cached selection metrics are summarized on demand. Selection metrics must be computed beforehand via compute_selection_metrics().

Parameters:
  • adata (anndata.AnnData) – AnnData object containing cached selection metrics in adata.uns["AA_selection_metrics"].

  • result_filters (Mapping[str, Any] | None, default None) – Optional filters applied to ArchetypeConfig entries when summarizing cached metrics.

Return type:

ggplot

Returns:

pn.ggplot A ggplot object showing the variance explained plot.