Feature proposal: plot_most_confused and plot_most_correct

When working on a lot of classes (and images) it is hard to analyze our model by using simple confusion matrix and stuff already provided.
I was trying to classify 1k types of plants (PlantClef 2016 dataset) and I needed further insight.

With others help I’ve managed to write plot_top_confused which takes 2 classes as arguments and outputs images that got missclassified (i.e. image class A, was labeled as B).
Using the outputs I was able to decide whenever to train model further or not, because those classes seems to have visible differences.

Also written plot_most_correct, so after outputting most_confused I could tell what typical example of given class looks like.

I could do a PR adding those plots (with better quality code than my drafts) to Classification Interpretation

Thread: Wanting to plot most confused classes

1 Like

Seems interesting, feel free to suggest a PR!


@sgugger not to tag on too much but also while we were making this I made some google colab widgets that help show all combinations you pass in, along with some useful functionality for tabular data as well. If I port that over to ipywidgets so it’s not just google colab could the widgets library use it?

1 Like

Sure, that sounds interesting!

1 Like

@Blanche , Are you still into this ?