I am using Lime to trace the behavior behind why the model take his decision to predict if this sentence is (NEG, POS or NEUTRAL) and for the most of cases lime explain correctly but in case like this why i entered NEG sentence, the model predict it as NEUTRAL but Lime visualize it with NEG highest percentage, so why i got logical error like this?
Asked
Active
Viewed 1,088 times
1 Answers
1
You are not providing a lot of details, so my answer is going to be similarly general: You original model is making a wrong prediction. Then lime is making a linear approximation of the model. Because of the approximative nature of the linear model, this is not exactly as the original model and deviates from the original model. In your case the original model gives a wrong prediction and the deviation of the linear approximation is - by chance - in the direction of the right answer, so that you get - by chance - the right answer from the approximation although the original model was wrong.

Make42
- 12,236
- 24
- 79
- 155
-
Sorry for not providing the sufficient details. So, i have annotated datasets with three labels(POS, NEG, NEUTRAL) and I am using classifier in my model such as SVM.SVC or LinearSVC to classify. And i generate .pkl file to keep the trained model as it is and open it to predict the input. when i predict the input and visualize using LIME i got label like NEG but Lime visualize the percentage of NEUTRAL more than NEG. And the Q here is why Lime shows different visualization from the model results. – MMamdouh Jan 28 '19 at 12:01
-
I am sorry but i don't have enough reputation to vote up. You provide me with the reason behind, and it's great but i want to solve such a problem like this what should i do? – MMamdouh Jan 30 '19 at 07:37
-
Do you mean that the the result of the local linear LIME-model gives you the highest probability for the label NEUTRAL, but the visualization of LIME returns the label NEG? Maybe the visualization shows the label of the original model (which might be NEG), but the probabilities for the local linear LIME-model (which is the highest for NEUTRAL)? Please edit your question such, that you post the code and the prediction answers for a) the original value, b) the local linear LIME-model and c) plot also the visualization of LIME. Then it will be easier to understand your issue. – Make42 Feb 03 '19 at 16:14