Description Usage Arguments Value Examples
Given a list of models, get their average prediction over a range of
values for each feature in features_cols
1 2 3 4 5 6 | run_partial_dependency(feature_dt, model_list,
feature_cols = names(feature_dt), predict_fcn = predict,
ensemble_colname = "ensemble", ensemble_fcn = median,
ensemble_models = names(model_list), num_grid = 10, custom_range = NULL,
plot_fcn = plot_partial_dependency, vimp_colname = "ensemble",
plot = TRUE, facet = TRUE, ncol = NULL)
|
feature_dt |
data.table containing features used in predictive model |
model_list |
named list of model objects. Each name will become a column containing predictions from that model. |
feature_cols |
character vector of column names in |
predict_fcn |
function that accepts a model as its first argument
and |
ensemble_colname |
character. Name of the column containing ensemble predictions |
ensemble_fcn |
function that combines a vector of predictions into
a single ensemble. Default is |
ensemble_models |
character vector of names from model_list. These models will be combined by ensemble_fcn to form the ensemble |
num_grid |
number of points to distribute along range of
|
custom_range |
should only be used if |
plot_fcn |
a function that accepts the output from
|
vimp_colname |
name of model (taken from from |
plot |
TRUE/FALSE. Should the partial dependencies be plotted? Defaults to TRUE |
facet |
TRUE/FALSE. If |
ncol |
if |
Output is a data.table
with one column for every model in
model_list
, an ensemble column, feature name and feature value columns,
and the variable importance column
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.