Builds surrogate model from an interpreter object based on the univariate PDP functions of the original model.
Source:R/distiller.R
distill.Rd
Builds a surrogate model from the PDP functions
Arguments
- object
The Interpreter object
- center.mean
Boolean value that determines whether to center each column of predictions by their respective means. Default is TRUE
- features
The indices of the features in the Interpreter's features that we want to include as PDP functions in the distilled model.
- cv
Boolean that indicates whether we want to cross-validate our fitted coefficients with a regularizer. This should only be done when regularizing coefficients.
- snap.grid
Boolean function that determines whether the model recalculates each value predicted or uses an approximation from previous calculations. When this parameter is set to TRUE, we approximate the predicted values with prevoius calculations. Default is TRUE.
- snap.train
Boolean that determines whether we use the training data or the equally spaced grid points. By default, this is true, which means we snap to grid points as determined by the training data's marginal distribution.
- params.glmnet
Optional list of parameters to pass to glmnet while fitting PDP curves to resemble the original predictions. By specifying parameters, one can do lasso or ridge regression.
- params.cv.glmnet
Optional list of parameters to pass to cv.glmnet while fitting PDP curves to resemble the original predictions. By specifying parameters, one can do lasso or ridge regression.