plot_top_contributors | R Documentation |
This function generates a plot of the top contributing features for the top n models.
plot_top_contributors(
models,
models_to_use = NULL,
data_to_use = "training",
n_predictors = 10,
n_columns = 5,
color = "#52565e",
labels_data = NULL,
sec_label = NULL
)
models |
A list of model objects generated by make_xgb_models |
models_to_use |
A vector of model names to restrict the plot to. |
data_to_use |
If "training" (default), it will use the full training data. If anything else, it will use the new predictions (must have used add_predictions before). |
n_predictors |
The maximum number of predictors to show per plot. |
n_columns |
If multiple models are being plotted, how many columns in the plot grid to use. |
color |
The color of the bars in the plot. |
plot_top_contributors(shap_table, name, 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.