Constructs an ALE for a model.
ale(
predict_function,
num_grid_points,
training_data,
variable_names,
center = "zero",
grid_points,
window_size
)a function taking a single tibble argument and returning the model predictions corresponding to that tibble.
the number of grid_points at which to construct the ALE
the training data used to fit the model
a vector of feature names in training data for which an ALE is required.
one of "uncentered" meaning the plots are not centered, "mean" meaning the plots are centered at their mean and "zero" meaning the ALE passes through the origin. When using center == "zero" we recommend setting window_size because otherwise a smaller and possibly empty set will be used to compute the ALE at zero.
The grid points to use for the AlE calculation.
the fraction of the data (between zero and one) used to compute each ALE point.