Description Usage Arguments Value
View source: R/local_explanation.R
Get a local explanation for a chosen misclassified instance
1 2 | local_explanation(instance, egalitarian, method = "breakDown",
predict_function = predict, ...)
|
instance |
observation to be explained as an index from 'validation_set' |
egalitarian |
object of class egalitarian |
method |
character specifying type of local explanation. Available options are "lime" for LIME, "live" for live and "breakDown" for breakDown. For details see documentations of packages lime, live and breakDown |
predict_function |
predict function for the model that returns classes, defaults to 'predict' |
... |
Additional parameters that will be passed to 'lime::explain', 'live::sample_locally2' or 'breakDown::broken'. For "live" method, this must include 'size' argument. If "lime" is used, model_type must be set. For details, read documentation for these packages. 'egalitarian' uses wrappers around these packages called 'lime_extractor', 'live_extractor' and 'breakDown'. More information can be found in help for these functions |
object of class egalitarian_local_explanation that consists of
data |
data from 'egalitarian' object |
target_name |
name of response variable |
model |
model object from 'egalitarian' object |
instance |
index of explained instance in validation set |
explanation_type |
character name indicating which explainer was used |
local_explanation |
explanation object created by lime/live/breakDown package |
variables |
names of variables which influenced the prediction negatively |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.