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
)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`.
shapley object
Character. Specifies statistic used for thresholding.
Either "mean" or "lowerCI" (default) should be specified.
Ignored if `top_n_features` is provided.
Numeric. Cutoff for thresholding on `method`. Default is zero, which means that all features with lower WMSHAP CI above zero will be selected.
Integer. If provided, selects the top N features by `mean`, overriding `method` and `cutoff`.
Character vector of features to keep. If provided, it is applied before `top_n_features`/`cutoff` selection (i.e., selection happens within this set).
E. F. Haghish