marcotcr / lime

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

How to get/compute the local fidelity? #594

Closed HajarHkm closed 3 years ago

HajarHkm commented 3 years ago

Hello,

Im new to LIME and want to determine its fidelity but since the provided explanations consist of a collection of local models it seemed i should settle for the local fidelity. STILL, I couldnt figure out how to get local fidelity %... or the linear model that locally explains the model.

Does anyone have an idea how to get the fidelity? and is there a way to compute a fidelity that will reflect the performance of LIME for explaining the model in question?

Update: In case someone is looking for this too xD... The local model that is trained can be found at lime.lime_base.explain_instance_with_data under the name easy_model