Given a interpreter object with at least one pair of features, create a small surrogate model for the two features using the PDP function as the output and the two features as the independent variables.
Source:R/plotter.R
localSurrogate.Rd
Plots and returns a Rforestry object with a single tree explaining the PDP surface.
Usage
localSurrogate(
object,
features.2d = NULL,
interact = FALSE,
params.forestry = list()
)
Arguments
- object
Interpreter object to make plots + surrogate for.
- features.2d
A two-column dataframe of pairs of features to make local surrogates for. Each row represents a pair of features, with the names of features as the entries.
- interact
An indicator specifying if the surrogate model should also be given the interaction terms to create the surrogate models with. Default is FALSE.
- params.forestry
Optional list of parameters to pass to the surrogate model. Defaults to the standard Rforestry parameters with ntree = 1 and maxDepth = 2.