Description Usage Arguments Value Examples

Fit white box model to the simulated data.

1 2 3 4 | ```
fit_explanation(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 of class "live_explainer" that consists of

`data` |
Dataset used to fit explanation model (may have less column than the original) |

`model` |
Fitted explanation model |

`explained_instance` |
Instance that is being explained |

`weights` |
Weights used in model fitting |

`selected_variables` |
Names of selected variables |

1 2 3 4 | ```
## Not run:
fitted_explanation <- fit_explanation(local_exploration1, "regr.lm", selection = TRUE)
## End(Not run)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.