lime icon indicating copy to clipboard operation
lime copied to clipboard

LIME Image Explainer Issue

Open OnkarMulay opened this issue 4 years ago • 0 comments

Code

image1 = transform_img_fn([os.path.join('D:\.....ut_files\tiles\block2\img1.jpeg')])

explainer = lime_image.LimeImageExplainer() explanation = explainer.explain_instance(image1[0].astype("double"), model_predict, top_labels=2, num_samples=2500, batch_size=1, hide_color=0)

dict_heatmap1 = dict(explanation.local_exp[explanation.top_labels[0]]) heatmap1 = np.vectorize(dict_heatmap1.get)(explanation.segments)

image

I wanted to know why is the colorbar level so low? Is that an issue?

plt.imshow(heatmap1, alpha=1, cmap = 'RdYlBu_r', vmax=1, vmin=-1) If scale is kept 1 to -1 I get: image

Is this because I keep batch_size = 1? Or is getting low scale on colorbar is really an issue? Or it is completely fine?

Thank you

OnkarMulay avatar Aug 29 '21 07:08 OnkarMulay