crested.pl.heatmap.correlations_predictions

crested.pl.heatmap.correlations_predictions#

crested.pl.heatmap.correlations_predictions(adata, model_names=None, split='test', log_transform=False, vmin=None, vmax=None, **kwargs)#

Plot correlation heatmaps of predictions vs ground truth or target values for different cell types.

Parameters:
  • adata (AnnData) – AnnData object containing the data in X and predictions in layers.

  • model_names (Optional[list[str]] (default: None)) – List of model names (adata.layers) to plot for predictions heatmap. Default is to plot all models in adata.layers.

  • split (str | None (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 (bool (default: False)) – Whether to log-transform the data before plotting.

  • vmin (Optional[float] (default: None)) – Minimum value for heatmap color scale.

  • vmax (Optional[float] (default: None)) – Maximum value for heatmap color scale.

  • kwargs – Additional arguments passed to render_plot() to control the final plot output. Please see render_plot() for details.

Return type:

Figure

Examples

>>> crested.pl.heatmap.correlations_predictions(
...     adata,
...     model_names=None,
...     split="test",
...     log_transform=True,
...     vmin=0.4,
...     vmax=0.85,
...     title="Correlations: Predictions vs Ground Truth",
... )
../../../_images/heatmap_correlations_predictions.png