marcotcr / lime

Lime: Explaining the predictions of any machine learning classifier
BSD 2-Clause "Simplified" License
11.5k stars 1.79k forks source link

Areas encouraging the top prediction are not shown #595

Closed naladog closed 3 years ago

naladog commented 3 years ago

I used the CIFAR10 dataset for a classification problem. In some samples the explanations are plotted fine, like in the following case of a blur bird image: Figure_1

In some other cases though, the boundaries are not shown at all. For example in the following airplane image: Figure_2

The estimated probability of being a plane is very high (0.99) and for some reason the mask array is the following: array([[1, 1, 1, ..., 1, 1, 1], [1, 1, 1, ..., 1, 1, 1], [1, 1, 1, ..., 1, 1, 1], ..., [1, 1, 1, ..., 1, 1, 1], [1, 1, 1, ..., 1, 1, 1], [1, 1, 1, ..., 1, 1, 1]], dtype=int64)

Do you have any ideas what could be the issue? Thank you very much for your time.

marcotcr commented 3 years ago

Ugh, sorry, I have no idea from the information you provided, other than maybe the segmentation function doesn't work for this kind of image. You should try the segmentation function out to make sure it produces reasonable segments.