Identify recurrent SHAP explanation paths among the training samples of one or more fitted POWERUP models. Path discovery is intentionally restricted to training SHAP values; prediction samples are not used to define paths.
Usage
calculate_explanation_paths(
models,
targets = NULL,
min_mean_r = NULL,
response_cutoff = NULL,
max_paths = 8,
min_path_size = 10,
min_path_fraction = 0.05,
max_outlier_fraction = 0.1,
min_silhouette = 0.3,
min_stability_ari = 0.75,
stability_repeats = 25,
stability_fraction = 0.8,
driver_thresholds = c(0.5, 0.7, 0.9),
top_n_features = 10,
distance = c("correlation", "cosine"),
seed = 101,
verbose = TRUE
)Arguments
- models
A named list of fitted POWERUP model objects.
- targets
Optional character vector of target names.
NULLanalyzes all models containing training SHAP values.- min_mean_r
Optional minimum mean cross-validation Pearson correlation.
- response_cutoff
Optional finite cutoff overriding each model's stored response cutoff.
- max_paths
Maximum raw dendrogram cut evaluated within each response class.
- min_path_size
Minimum number of training samples required for a supported path.
- min_path_fraction
Minimum fraction of a response class required for a supported path.
- max_outlier_fraction
Maximum fraction of a response class that may be assigned to undersized branches.
- min_silhouette
Minimum silhouette required for a multipath solution.
- min_stability_ari
Minimum subsampling adjusted Rand index required for a multipath solution.
- stability_repeats
Number of repeated subsamples used to estimate path stability.
- stability_fraction
Fraction of supported training samples retained in each stability subsample.
- driver_thresholds
Cumulative between-path SHAP-dispersion thresholds summarized for each response class.
- top_n_features
Number of predominant, distinguishing, and driver features retained in compact summaries.
- distance
SHAP-profile distance metric. Correlation distance is the default.
- seed
Random seed used for stability subsampling.
- verbose
If
TRUE, report progress.
Value
A powerup_explanation_paths object containing training-sample path assignments, class and path results, diagnostics, and analysis parameters.
Examples
if (FALSE) { # \dontrun{
paths <- calculate_explanation_paths(my_models, targets = c("CTNNB1", "FGFR1"))
} # }