liana.plotting.target_metrics

Contents

liana.plotting.target_metrics#

liana.plotting.target_metrics(misty=None, stat=None, target_metrics=None, top_n=None, ascending=False, key=None, filter_fun=None, figure_size=(5, 5), aggregate_fun=None, return_fig=True)#

Plot target metrics.

Parameters:
  • misty (MistyData (default: None)) – MistyData object with modelling results

  • stat (str (default: None)) – Statistic to plot

  • target_metrics (DataFrame (default: None)) – A target_metrics DataFrame

  • top_n (int (default: None)) – top_n entities to plot.

  • ascending (bool (default: False)) – Whether to sort in ascending order

  • key (Callable (default: None)) – Function to use to sort the dataframe

  • filter_fun (Callable (default: None)) – A function, applied along the columns (axis=1), used to filter the results to be plotted.

  • aggregate_fun (Callable (default: None)) – A function used to aggregate the results to be plotted.

  • figure_size (tuple[float, float] (default: (5, 5))) – Figure x,y size

  • return_fig (bool (default: True)) – bool whether to return the fig object.

Return type:

Figure

Returns:

Returns a plotnine plot.

Raises:

ValueError – If the misty input or stat provided are not valid.