popari.tl.compute_confusion_matrix

popari.tl.compute_confusion_matrix#

popari.tl.compute_confusion_matrix(dataset, labels, predictions, result_key='confusion_matrix')#

Compute confusion matrix for labels and predictions.

Useful for visualizing clustering validity.

Parameters:
  • trained_model – the trained Popari model.

  • labels (str) – the key in the .obs dataframe for the label data.

  • predictions (str) – the key in the .obs dataframe for the predictions data.

  • result_key (str) – the key in the .uns dictionary where the reordered confusion matrix will be stored.

  • dataset (PopariDataset)