thomasp85 / lime

Local Interpretable Model-Agnostic Explanations (R port of original Python package)
https://lime.data-imaginist.com/
Other
481 stars 109 forks source link

Gower distance tends to fit global model #158

Closed pkopper closed 5 years ago

pkopper commented 5 years ago

I experienced a practical problem when using Gower's distance as a dissimilarity measure. In many different settings, the resulting model was very global. This is - to my mind - because when using Gower's distance we do not work with a kernel function. This can be argued to be meaningful as Gower's distance 'scales' the resulting dissimilarities already. However, practically I have observed in some settings that the resulting dissimilarities are not very discriminating so that we end up with an explainer which is not that different from a global explainer. Did someone else make similar observations and does someone have a good solution for working with mixed data? I found the distance measure (eq. 9) from the article below very helpful in different contexts. However, the use of it would require to change to package code. http://www.cs.ust.hk/~qyang/Teaching/537/Papers/huang98extensions.pdf

thomasp85 commented 5 years ago

It might make sense to allow a kernel on top of the Gower distance as well...

pkopper commented 5 years ago

If you want to I can suggest a fix via pull request.

thomasp85 commented 5 years ago

Thank you — that would be welcome