I am working on a binary classification using random forest and explanation using LIME. I already referred the posts here, here and here.

I have the feature contribution info from LIME like as shown below (for predicted class = 1)

Predicted class probability 0 = 0.22 (blue)
Predicted class probability 1 = 0.78 (orange)

Div=sales= 0.09 (blue)
Quantity=50000= 0.06 (blue)
Supplier=XXX= 0.05 (blue)
SUBREGION= 0.04 (blue)
Product Classification = 0.02 (orange)

The below is the another example

Here value refers to feature importance returned by Lime. negative values indicate blue color items (for class 0) and positive values indicate orange color items (for class 1)

class 1 prob = 57% class 0 prob = 43%

enter image description here

My questions are as follows

a) Why is the negative feature influence (sum of blue values) is higher than positive value features (sum of orange values)? especially for class = 1? In that case, shouldn't the output be class=0? Is it making use of Intercept? How should I interpret this? I have shown only top 5 features but rest of the features also have negative values (decreasing order).

b) If I am presenting this to the business, how should I explain to the business in a scenario like this where for a positive class, negative feature influence is higher (and I guess due to intercept value, it became as positive class)?

  • 1
    $\begingroup$ Can you please add the output of LIME directly? Feature values usually refer to the values of the features for that particular subject ID, not the parameters of the underlying logistic regression model. $\endgroup$
    – usεr11852
    Feb 15, 2022 at 16:46
  • $\begingroup$ @user11852 - Sorry, I updated the post with Lime output. I cannot show the raw output as it is due to feature names etc. So, have edited them and pasted here. Hope it helps. Thanks for your help $\endgroup$
    – The Great
    Feb 15, 2022 at 21:40
  • $\begingroup$ I hope you can see now that these make more sense, the previous values shown (-7.5, etc.) didn't refer to LIME but rather to the features values of the instance $x_i$. Anyway, back to value interpretation: if Sales were not the bucket that they are noq , instead probability of being blue being 0.22 we would have 0.22-0.09 = 0.013. Note that sometimes LIME just ain't good in approximating the local fit, what is the associated $R^2$? $\endgroup$
    – usεr11852
    Feb 15, 2022 at 21:46
  • $\begingroup$ The explanation fit is 27%. All fit are above 20. So, for this case, we can see that though the predicted class is 1, the orange feature is only one which contributes only 0.02 only? $\endgroup$
    – The Great
    Feb 15, 2022 at 21:50
  • $\begingroup$ If you subtract a feature importance value returned by Lime from the probability, then does it mean summing up blue and orange feature importance values should equal to the probability of their respective classes? $\endgroup$
    – The Great
    Feb 15, 2022 at 21:56


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.