plot_shap_scatter_for_new_samples | R Documentation |
This function plots the contribution (Shapley values) against the value of a feature.
plot_shap_scatter_for_new_samples(
models,
models_to_use,
model_data,
new_samples_to_use = NULL,
remove_prefix = TRUE,
sample_colors = NULL,
n_features = 6,
n_columns = 3
)
models |
A list of models generated with make_xgb_models and has appended predictions with add_predictions. |
models_to_use |
A vector of model names to plot. |
model_data |
The training dataset used to generate the model. |
sample_colors |
Color vector to use for samples_to_use. |
n_features |
The number of top contributors to show their individual contribution. All other predictors will have their contribution combined. |
n_columns |
Number of columns to plot in a grid when plotting more than one sample. |
samples_to_use |
Optional to highlight specific samples. |
lineage_to_use |
Optional to highlight specific samples of certain lineage. |
plot_shap_scatter_for_new_samples(my_models, c("ko_ctnnb1","ko_myod1"), model_dataset, samples_to_use = "my_sample")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.