azimuth icon indicating copy to clipboard operation
azimuth copied to clipboard

Can we order rows/columns in the confusion matrix in terms of meaningful confusion clusters.

Open gabegma opened this issue 3 years ago • 1 comments

gabegma avatar Jun 09 '22 18:06 gabegma

Example using Cuthill-Mckee algorithm. I put a threshold at .05, it seems to help.

from scipy.sparse import csr_matrix
from scipy.sparse.csgraph import reverse_cuthill_mckee

graph = csr_matrix(CONFUSION_MATRIX > 0.05)
output = reverse_cuthill_mckee(graph, symmetric_mode=False)
print(output)

image

image

Dref360 avatar Jun 17 '22 17:06 Dref360