robinvanschaik / interpret-flair

A small repository to test Captum Explainable AI with a trained Flair transformers-based text classifier.
MIT License
24 stars 2 forks source link

Make target label work with multi class. #10

Open sgoede opened 2 years ago

sgoede commented 2 years ago

As target_label only accept single values, making it work on multi class problems is not so simple. I have written a simple looping function to iterate over the correct target labels, but as on Flair 0.8post1, I find that predictions of the interpret_sentence class deviate from the orginal multi class model (i.e. wrong class prediction).

On personal note: I think you have done a really good job in building this solution. It has worked wonders for multi label problems already.

robinvanschaik commented 2 years ago

Hi @sgoede,

How nice to hear. Thanks for adding a comment to illustrate this issue.

Are you willing to contribute your solution with a PR? :)