mmc.plot_confusion()
- mmochi.plotting.plot_confusion(adata, levels, hierarchy=None, key_added='lin', holdout_only=True, batch_key=None, save=None, show=True, title_addition=None, **kwargs)
Determine the performance at a single level by creating a confusion plot using high-confidence thresholds as truth.
- Parameters:
adata (
AnnData) – Object containing a DataFrame in the .obsm[key_added] specifiying the results of high_confidence thresholding, training, and classificationlevels (
Union[str,List[str]]) – Level or levels of the classifier to create confusion plots for, “all” creates plots for whole hierarchyhierarchy (default:
None) – Hierarchy object with classification level informationkey_added (
str(default:'lin')) – Key in .obsm, where information on whether a level had a high-confidence call or was training dataholdout_only (
bool(default:True)) – Whether to only include data that was not trained onbatch_key (
str(default:None)) – Column within the adata.obs that delineates batchessave (
str(default:None)) – Filepath to pdf where the plots will be savedshow (
bool(default:True)) – Whether to show the saved confusion plotstitle_addition (
str(default:None)) – Phrase to add to the title of the confusion plotssklearn.metrics.ConfusionMatrixDisplay.from_predictions() (**kwargs are passed to) –