Get the grid values for a feature based on the observed values in the data.
get_grid(var, data)
| var | Character string giving the name of the feature of interest. Only integer, numeric or factor variables are supported for now. |
|---|---|
| data | Data frame containing the original training data. |
One-column tidy data frame (i.e., a "tibble" object). This column
contains the grid values for feature var based on the observed
values in data.
if (FALSE) { data('mtpl_be') 'ageph' %>% get_grid(data = mtpl_be) 'coverage' %>% get_grid(data = mtpl_be) tidyr::expand_grid('ageph' %>% get_grid(data = mtpl_be), 'coverage' %>% get_grid(data = mtpl_be)) }