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 resultsstat (
str(default:None)) – Statistic to plottarget_metrics (
DataFrame(default:None)) – A target_metrics DataFrametop_n (
int(default:None)) –top_nentities to plot.ascending (
bool(default:False)) – Whether to sort in ascending orderkey (
Callable(default:None)) – Function to use to sort the dataframefilter_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 sizereturn_fig (
bool(default:True)) –boolwhether to return the fig object.
- Return type:
Figure- Returns:
Returns a plotnine plot.
- Raises:
ValueError – If the
mistyinput orstatprovided are not valid.