- object
The fitted model to estimate ICE curves for.
- X
The design matrix we wish to estimate ICE curves for. Rows are observations, columns are
predictors. Typically this is taken to be object
's training data, but this is not
strictly necessary.
- y
Optional vector of the response values object
was trained on. It is used
to compute y-axis ranges that are useful for plotting. If not passed, the range
of predicted values is used and a warning is printed.
- predictor
The column number or variable name in X
of the predictor of interest,
(\(x_S = X[, j]\)).
- predictfcn
Optional function that accepts two arguments, object
and newdata
, and
returns an N
vector of object
's predicted response for data newdata
.
If this argument is not passed, the procedure attempts to find a generic predict
function corresponding to class(object)
.
- verbose
If TRUE
, prints messages about the procedure's progress.
- frac_to_build
Number between 0 and 1, with 1 as default. For large X
matrices or fitted models
that are slow to make predictions, specifying frac_to_build
less than 1 will choose
a subset of the observations to build curves for. The subset is chosen such that the remaining
observations' values of predictor
are evenly spaced throughout the quantiles of the
full X[,predictor]
vector.
- indices_to_build
Vector of indices, \(\subset \{1, \ldots, nrow(X)\}\) specifying which observations to build ICE curves for. As this is an alternative to setting frac_to_build
, both
cannot be specified.
- num_grid_pts
Optional number of values in the range of predictor
at which to estimate each curve.
If missing, the curves are estimated at each unique value of predictor
in the X
observations we estimate ICE curves for.
- logodds
If TRUE
, for classification creates PDPs by plotting the centered log-odds implied by the fitted
probabilities. We assume that the generic or passed predict function
returns probabilities, and so the flag tells us to transform these to centered logits after
the predictions are generated. Note: probit
cannot be TRUE
.
- probit
If TRUE
, for classification creates PDPs by plotting the probit implied by the fitted
probabilities. We assume that the generic or passed predict function
returns probabilities, and so the flag tells us to transform these to probits after
the predictions are generated. Note: logodds
cannot be TRUE
.
- ...
Other arguments to be passed to object
's generic predict function.