crested.pl.violin.correlations#
- crested.pl.violin.correlations(adata, model_names=None, split='test', log_transform=False, ylim=(0.0, 1.0), title='Class-wise prediction vs ground truth correlations', **kwargs)#
Plot correlation violinplots of predictions vs ground truth for different cell types.
Calculates correlations over cell types, i.e. for each cell type, calculates the correlation between ground truth and predictions across all regions.
- Parameters:
adata – AnnData object containing the data in
X
and predictions inlayers
.model_names (default:
None
) – Model name or list of model names (adata.layers) to use to calculate correlations with ground truths. Default is to plot all models inadata.layers
.split (default:
'test'
) – ‘train’, ‘val’, ‘test’ subset or None. If None, will use all targets. If not None, expects a “split” column in adata.var.log_transform (default:
False
) – Whether to log-transform the data before calculating correlations.ylim (default:
(0.0, 1.0)
) – Limits for the y axis.kwargs – Additional arguments passed to
render_plot()
to control the final plot output. Please seerender_plot()
for details.
See also
Examples
>>> crested.pl.violin.correlations( ... adata, ... model_names=['Base DilatedCNN', 'Fine-tuned DilatedCNN'], ... split="test", ... log_transform=True, ... ylim=(0., 1.), ... title="Class-wise prediction vs ground truth correlations", ... )