anndict.plot.plot_label_changes

anndict.plot.plot_label_changes#

anndict.plot.plot_label_changes(adata, true_label_key, predicted_label_key, plot_percentage=True, stratum=None)[source]#

Plot the changes between true and predicted labels in an AnnData object.

Parameters:
adata AnnData

An AnnData.

true_label_key str

Key for the true labels in adata.obs.

predicted_label_key str

Key for the predicted labels in adata.obs.

plot_percentage bool (default: True)

If True, plot the percentage of labels changed. If False, plot the count of labels changed.

stratum str (default: None)

Title for the plot, often used to indicate the stratum. Default is None.

Return type:

tuple[Figure, Axes]

Returns:

The figure and axis of the plot.