| SHAPBoostEstimator-class | R Documentation |
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.
evaluatorThe model that is used to evaluate each additional feature.
metricA character string representing the evaluation metric.
xgb_paramsA list of parameters for the XGBoost model.
number_of_foldsThe number of folds for cross-validation.
epsilonA small value to determine convergence.
max_number_of_featuresThe maximum number of features to select.
siso_ranking_sizeThe number of features to consider in the SISO ranking.
siso_orderThe order of combinations to consider in SISO.
resetA logical indicating whether to reset the weights.
num_resetsThe number of resets allowed.
fold_random_stateThe random state for reproducibility in cross-validation.
verboseThe verbosity level of the output.
stratificationA logical indicating whether to use stratified sampling. Only applicable for c-index metric.
collinearity_checkA logical indicating whether to check for collinearity.
correlation_thresholdThe threshold for correlation to consider features as collinear.
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)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.