sfaira.train.SummarizeGridsearchCelltype.plot_best_classwise_heatmap

SummarizeGridsearchCelltype.plot_best_classwise_heatmap(organ: str, organism: str, datapath: str, store_format: str, targetpath: str, configpath: str, partition_select: str = 'val', metric_select: str = 'custom_cce_agg', metric_show: str = 'f1', collapse_cv: str = 'mean', min_cells: int = 10, height_fig: int = 7, width_fig: int = 7)

Plot evaluation metric heatmap for specified organ by cell classes and model types.

Parameters
  • organ – Organ to plot in heatmap.

  • organism – Species that the gridsearch was run on

  • datapath – Path to the local sfaira data repository

  • store_format

  • targetpath

  • configpath

  • partition_select – Based on which partition to select the best model - train - val - test - all

  • metric_select – Based on which metric to select the best model - loss - accuracy - custom_cce_agg - acc_agg - f1 - tpr - fpr

  • metric_show – Which classwise metric to plot. - accuracy - f1

  • collapse_cv – How to collapse over the single cv runs.

  • min_cells – Minimum number of cells of a type must be present in the whole dataset for that class to be included in the plot.

  • height_fig – Figure height.

  • width_fig – Figure width.

Returns

fig, axs, sns_data_heatmap