iml icon indicating copy to clipboard operation
iml copied to clipboard

Lime is not working

Open nilover opened this issue 3 years ago • 1 comments

Hi, I am using mlr and iml to build an interpretable prediction model using xgboost. I tried Lime as well as shapley to extract the interpretable feature score (Lime) and phi values (Shapley).

mod_lime.explain = LocalModel$new(mod_predictor, 
+                                  x.interest = data_X[1,],
+                                  k= total_num_features)

Error in lognet(x, is.sparse, ix, jx, y, weights, offset, alpha, nobs,  : 
  NA/NaN/Inf in foreign function call (arg 5)

mod_shapley = Shapley$new(mod_predictor, 
                                                  x.interest = data_X[1,])
plot(mod_shapley)

Thank you very much for the help.

nilover avatar Mar 11 '21 16:03 nilover

The error seems like there is some trouble fitting the LIME regression model. Could you provide a reproducible example? Without one I can't say why the error occurs.

christophM avatar Mar 14 '21 08:03 christophM