Fit white box model to the simulated data.
fit_explanation2(live_object, white_box = "regr.lm", kernel = gaussian_kernel, standardize = FALSE, selection = FALSE, response_family = "gaussian", predict_type = "response", hyperpars = list())
| live_object | List return by add_predictions function. |
|---|---|
| white_box | String, learner name recognized by mlr package. |
| kernel | function which will be used to calculate distance between simulated observations and explained instance. |
| standardize | If TRUE, numerical variables will be scaled to have mean 0, variance 1 before fitting explanation model. |
| selection | If TRUE, variable selection based on glmnet implementation of LASSO will be performed. |
| response_family | family argument to glmnet (and then glm) function. Default value is "gaussian" |
| predict_type | Argument passed to mlr::makeLearner() argument "predict.type". Defaults to "response". |
| hyperpars | Optional list of values of hyperparameteres of a model. |
List consting of
Dataset used to fit explanation model (may have less column than the original)
Fitted explanation model
Instance that is being explained
# NOT RUN { fitted_explanation <- fit_explanation2(local_exploration1, "regr.lm", selection = TRUE) # }