lime
lime copied to clipboard
LIME Image Explainer Issue
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)

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:

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