marcotcr / lime

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

How to extract the feature names and range of values provided in the LIME explanation for further analysis? #659

Open adib0073 opened 2 years ago

adib0073 commented 2 years ago

I was wondering if there is a way to extract the features and range of values provided in the LIME explanations. For example, if I use: exp.as_list() I can get the LIME explanations as a list:

 ('V58 <= 2.00', 0.01779097962511598),
 ('FR_V5 <= 0.00', 0.01655396480669045),
 ('V16 <= 1.00', 0.015417445049340592),
 ('V49 <= 0.00', 0.013619686539722495),
 ('V70 <= 0.00', -0.011270360120878545),

But I want to extract this explanation, as something like this: <feature_name, operator (e.g. >,<= and so on) and the value(s)> This would allow to do further analysis using LIME.