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

Bug for R^2 #148

Closed Make42 closed 5 years ago

Make42 commented 5 years ago

There seems to be a bug in R/lime.R. In line 52

r2 <- fit$deviance / fit$null.deviance

but in line 60

r2 <- fit$dev.ratio

where dev.ratio=1-dev/nulldev according to ?glmnet. So in the case of line 52 a 0 would be a perfect fit, while in line 60 a 1 would be perfect fit. This should be consistent!

pkopper commented 5 years ago

156 and #157 deal with this issue in more detail.

Make42 commented 5 years ago

Also, please mention, once this fix is pushed to cran.

thomasp85 commented 5 years ago

Should get on CRAN this week