lime icon indicating copy to clipboard operation
lime copied to clipboard

How to get explanations for all classes

Open VIJAYAYERUVA opened this issue 4 years ago • 1 comments

Dear Team, @marcotcr,

How can I get explanations for multiple classes? Currently, I am only getting for the top three classes with the below code.

exp.show_in_notebook()

The "label" field only takes the top three class labels. If I pass all the class labels (e.g., I have six classes), it throws the keyerror.

exp.show_in_notebook(labels=[0, 2, 5]) - This code working (top three classes)
exp.show_in_notebook(labels=[0, 1, 2, 3, 4, 5]) - This code is not working (all classes), throwing keyerror with key 1.

Any help is appreciated. I can give more details if necessary.

VIJAYAYERUVA avatar Jan 18 '22 19:01 VIJAYAYERUVA

Just check this link
https://lime-ml.readthedocs.io/en/latest/lime.html#lime.lime_tabular.LimeTabularExplainer.explain_instance and set "top_labels" =6 . I may solve the problem

loveneet29 avatar Mar 03 '22 14:03 loveneet29