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
.obsdataframe for the label data.predictions (str) – the key in the
.obsdataframe for the predictions data.result_key (str) – the key in the
.unsdictionary where the reordered confusion matrix will be stored.dataset (PopariDataset)