View source: R/feature.selection.R
| feature.selection | R Documentation |
Selects a subset of features from a shapley object. Features can be selected by: (1) specified 'features', (2) 'top_n_features', or (3) WMSHAP cutoff for "mean" or "lowerCI".
feature.selection(
shapley,
method = "lowerCI",
cutoff = 0,
top_n_features = NULL,
features = NULL
)
shapley |
shapley object |
method |
Character. Specifies statistic used for thresholding.
Either |
cutoff |
Numeric. Cutoff for thresholding on 'method'. Default is zero, which means that all features with lower WMSHAP CI above zero will be selected. |
top_n_features |
Integer. If provided, selects the top N features by 'mean', overriding 'method' and 'cutoff'. |
features |
Character vector of features to keep. If provided, it is applied before 'top_n_features'/'cutoff' selection (i.e., selection happens within this set). |
A list with:
The updated shapley object.
Character vector of selected features, ordered by decreasing mean SHAP.
Numeric vector of mean SHAP values aligned with 'features'.
E. F. Haghish
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.