Description Usage Arguments Value Examples
View source: R/dalex_shortcut.R
Fit local model around the observation: shortcut for DALEX explainer objects
1 2 3 | local_approximation(explainer, observation, target_variable_name,
n_new_obs, local_model = "regr.lm", select_variables = F,
predict_type = "response", kernel_type = gaussian_kernel, ...)
|
explainer |
a model to be explained, preprocessed by the DALEX::explain function |
observation |
a new observation for which predictions need to be explained |
target_variable_name |
name of the response variablea as a character |
n_new_obs |
Number of observation in the simulated dataset |
local_model |
Character specyfing mlr learner to be used as a local model |
select_variables |
If TRUE, variable selection will be performed while fitting the local linear model |
predict_type |
Argument passed to mlr::makeLearner() argument "predict.type" while fitting the local model. Defaults to "response" |
kernel_type |
Function which will be used to calculate distances from simulated observation to explained instance |
... |
Arguments to be passed to sample_locally function |
object of class live_explainer. More details in fit_explanation function help.
1 2 3 4 5 6 7 8 9 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.