ModelOriented / localModel

LIME-like explanations with interpretable features based on Ceteris Paribus curves. Now on CRAN.
https://modeloriented.github.io/localModel
14 stars 3 forks source link

Refactoring of individual_surrogate_model #20

Closed harell closed 5 years ago

harell commented 5 years ago

Thanks for the effort put in this package.

I'm getting an error from individual_surrogate_model line 158

After spending 3 hours debugging this, it doesn't look like I'm having progress.

The main reason is the complexity of individual_surrogate_model.

What does the function in lines 160-179 suppose to do?

Could you please refactor it into a stand-alone function and add a unit test for easier dubbing? Moreover, individual_surrogate_model does many things. This makes it hard to (a) understand and (b) test isolate cases.

Thanks

image

mstaniak commented 5 years ago

Good point, I will fix this as soon as I can.

The code in lines 160-179 transforms the dataset back to the original data spaces

mstaniak commented 5 years ago

Can you please share the error message? Also, a reproducible example would be nice.

harell commented 5 years ago

Sure

Attached is the dataset Attached is the code. Change line 7 to point at the dataset

reproducible-bug.zip

mstaniak commented 5 years ago

Thanks, I'll look into this.

mstaniak commented 5 years ago

I fixed this bug in the refactoring branch, but code improvements are still in progress. Once I finish, I will merge the changes to master. The problem was with regular expressions, just like in #21.