Closed alanault closed 5 years ago
A-ha! resolved this.
Looks like I should pass the arguments through the lime::explain function
rather than inside the explainer itself.
i.e.
explanation <- lime::explain(x = test_dat,
explainer = explainer,
country = "FR")
Actually ... my bad, I was right first time. I had changed the underlying lime code to make this work.
I believe we're missing an ellipsis in the explain.character
method.
line 98 misses the ellipsis which is needed to pass through additional arguments. It currently reads:
case_res <- predict_model(x = explainer$model, newdata = permutations_tokenized, type = o_type)
... and I believe it should say:
case_res <- predict_model(x = explainer$model, newdata = permutations_tokenized, type = o_type, ... = ...)
Passing ellipsis on to the prediction function is not something that has been advertised, though it may be a good idea
Hi there,
I've written a predict_model class for my somewhat esoteric text model. I'd like to pass arguments to the underlying method using the lime function, but they don't seem to be passing down via ...
Looking at the underlying code, I'm not sure whether they're correctly being passed to the underlying method.
I'm building my explainer as:
where I'd like "FR" to be passed to the underlying method. Although it's present in the explainer object, it doesn't seem to be passed to the method.
Any ideas, or am I fundamentally missing something?
Many thanks Alan