mantispy.pl.moa_confusion#
- mantispy.pl.moa_confusion(adata, key='moa', normalize=True, ax=None)[source]#
The confusion matrix of
nn_moa_classify(), as a heatmap.With row normalization the diagonal is per-mechanism recall, and an off-diagonal block marks a pair of mechanisms the morphology does not separate. Such pairs usually have similar phenotypes.
- Parameters:
adata (
AnnData) – Object holding the confusion tablenn_moa_classify()wrote.key (
str(default:'moa')) – Name that run’s outputs were stored under, whose confusion table iskey + "_confusion".normalize (
bool(default:True)) – Divide each row by its total, which turns the counts into per-mechanism recall.ax (
Axes|None(default:None)) – Axes to draw on, orNonefor a new figure.
- Return type:
- Returns:
The axes when the caller passed
ax, elseNonebecause the plot then owns the figure it created. When returned they hold true against predicted mechanisms with the values printed when there are at most 400 cells, and the run’s scheme and accuracy in the title.- Raises:
KeyError –
uns["mantispy"]holds nokey + "_confusion"table.