Feature Selection with Bootstrap for Each Cluster
Source:R/FeatureSelectionWithBootstrap.R
FeatureSelectionWithBootstrap.RdThis function performs feature selection using a logistic regression model and bootstrapping for each cluster in the dataset. For each cluster, the function evaluates which features are significantly associated with the cluster based on a logistic regression model with bootstrap sampling. The output includes a count of significant features for each cluster based on the p-value threshold.
Usage
FeatureSelectionWithBootstrap(
data,
p.no_bootstrap = 0.01,
p.bootstrap = 0.05,
num.iteration = 1000,
nCores = parallel::detectCores() - 3
)Arguments
- data
A data frame where the first column is the cluster variable (categorical), and the other columns are feature values.
- p.no_bootstrap
Numeric. The p-value threshold for the features to be selected based on the original data (default: 0.01).
- p.bootstrap
Numeric. The p-value threshold for the features to be selected based on bootstrapped samples (default: 0.05).
- num.iteration
Integer. The number of bootstrap iterations (default: 1000).
- nCores
Integer. The number of CPU cores to use for parallel processing (default: automatically set to all cores minus 3).