SHAPBoostEstimator-class: SHAPBoostEstimator Class

SHAPBoostEstimator-classR Documentation

SHAPBoostEstimator Class

Description

This class implements the SHAPBoost algorithm for feature selection. It is designed to be extended by specific implementations such as SHAPBoostRegressor and SHAPBoostSurvival. Any new method should implement the abstract methods defined in this class.

Fields

evaluator

The model that is used to evaluate each additional feature.

metric

A character string representing the evaluation metric.

xgb_params

A list of parameters for the XGBoost model.

number_of_folds

The number of folds for cross-validation.

epsilon

A small value to determine convergence.

max_number_of_features

The maximum number of features to select.

siso_ranking_size

The number of features to consider in the SISO ranking.

siso_order

The order of combinations to consider in SISO.

reset

A logical indicating whether to reset the weights.

num_resets

The number of resets allowed.

fold_random_state

The random state for reproducibility in cross-validation.

verbose

The verbosity level of the output.

stratification

A logical indicating whether to use stratified sampling. Only applicable for c-index metric.

collinearity_check

A logical indicating whether to check for collinearity.

correlation_threshold

The threshold for correlation to consider features as collinear.

Examples

if (requireNamespace("flare", quietly = TRUE)) {
  data("eyedata", package = "flare")
  shapboost <- SHAPBoostRegressor$new(
    max_number_of_features = 1,
    evaluator = "lr",
    metric = "mae",
    siso_ranking_size = 10,
    verbose = 0
  )
  X <- as.data.frame(x)
  y <- as.data.frame(y)
  subset <- shapboost$fit(X, y)
}


SHAPBoost documentation built on Dec. 4, 2025, 5:08 p.m.