Plot confusion matrix with large number of labels

Hi everyone,
I want to do some data viz on my model after the train and the problem is that i have 100000 images in val_set and 3000 labels . Is it possible to plot a readable confusion matrix with this number of labels or are there any other alternatives to see how the model performed in each label ?

1 Like

I handled this in a 100s of classes challenge by a) putting a savefig() option in the fastai CM plotter. b) outputting the CM as a CSV then using conditional highlighting in excel to create a heat map. For my situation I found by the time it became unreadable in a notebook it wasn’t much use as a saved jpg either so better to analyse the cm matrix as data. Putting it in a data frame sounds wise given the size you are talking about.

1 Like

Thanks for your answer , I think handling the cm as a np matrix and creating my own functions to calculate statistics over this matrix would be the right option

1 Like