
Generate SHAP Contributions for a Single Sample
generate_shap_contributions.RdThis function generates SHAP contributions for a single sample using a DALEX explainer object. It constructs a sample label based on the first column of the data and the row name, computes the SHAP values, and optionally saves the results as an RDS file in a structured directory.
Usage
generate_shap_contributions(
explainer,
data_to_shap,
target_var,
sample_idx,
directory_to_save = NULL
)