R/partialDependence.R
partialDependence_data.Rd
Create a dataset with fixed values for reference.var
for all other
values of data
, or using mc
random samples from data
(Monte Carlo integration).
partialDependence_data(
data,
reference.var,
support = 20,
points = NULL,
mc = NULL,
keep_id = FALSE
)
The data.frame
that was used to train the
model.
Character vector, referring to the (independent) reference variable or variables for which partial dependence is calculated. Providing two (or more) variables allows for probing interactions, but note that this is computationally expensive.
Integer. Number of grid points for interpolating the
reference.var
. Alternatively, use points
for one or more
variables named in reference.var
.
Named list, with elements corresponding to reference.var
. Use this argument to provide specific points for which to obtain marginal
dependence values; for example, the mean and +/- 1SD of reference.var
.
Integer. If mc
is not NULL
, the function will sample
mc
number of rows from data
with replacement, to estimate
Boolean. Default is false. Should output contain a row id column? marginal dependency using Monte Carlo integration. This is less computationally expensive.