mmc.plot_confidence()
- mmochi.plotting.plot_confidence(adata, levels, hierarchy=None, key_added='lin', probability_suffix='_probabilities', holdout_only=True, batch_key=None, save=None, show=True, title_addition=None, bins=10)
Determine how confident classification is for each subset by displaying calibration curves, which compare the events classified at a given class to its confidence.
- Parameters:
adata (
AnnData) – AnnData object containing .obsm[key_added] and .obs[batch_key]levels (
Union[str,List[str]]) – Level or levels of the classifier to create confidence plots for, “all” creates plots for whole hierarchyhierarchy (default:
None) – Hierarchy object with classification level informationkey_added (
str(default:'lin')) – Key in .obsm, where results from high-confidence thresholding and predicted probabilities are storedprobability_suffix (
str(default:'_probabilities')) – Suffix in .obsm[key_added] the delineates probability data for the classificationholdout_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 confidence plotstitle_addition (
str(default:None)) – Phrase to add to the title of the confidence plotsbins (
int(default:10)) – Number of bins to split the probability [0,1] interval. See sklearn.calibration.calibration_curve for more details