This is the default function of spFeatureSelection. See spFeatureSelection for example.
spFSR.default(
task,
wrapper = NULL,
scoring = NULL,
perturb.amount = 0.05,
gain.min = 0.01,
gain.max = 2,
change.min = 0,
change.max = 0.2,
bb.bottom.threshold = 10^(-8),
mon.gain.A = 100,
mon.gain.a = 0.75,
mon.gain.alpha = 0.6,
hot.start.num.ft.factor = 15,
hot.start.max.auto.num.ft = 150,
use.hot.start = TRUE,
hot.start.range = 0.2,
rf.n.estimators = 50,
gain.type = "bb",
num.features.selected = 0L,
iters.max = 100L,
stall.limit = 35L,
n.samples.max = 5000,
ft.weighting = FALSE,
encoding.type = "encode",
is.debug = FALSE,
stall.tolerance = 10^(-8),
random.state = 1,
rounding = 3,
run.parallel = TRUE,
n.jobs = NULL,
show.info = TRUE,
print.freq = 10L,
num.cv.folds = 5L,
num.cv.reps.eval = 3L,
num.cv.reps.grad = 1L,
num.grad.avg = 4L,
perf.eval.method = "cv"
)spFSR returns an object of class "spFSR". An object of class "spFSR" consists of the following:
An mlr3 package tsk object defined on the best performing features.
An mlr3 package lrn object or a mlr3pipelines package GraphLearner object as specified by the user.
An mlr3 package msr as specified by the user.
An mlr3 package model object trained by the wrapper using task.spfs.
A data.frame object containing detailed information on each iteration.
Names of the best performing features.
The number of best performing features.
A vector of importance ranks of the best performing features.
The total number of iterations executed.
The iteration where the best performing feature subset was encountered.
The best measure value encountered during execution.
The standard deviation corresponding to the best measure value encountered.
Total run time in minutes.
Dataframe with boolean of selected features, names and measure
Call.
A task tsk object created using mlr3 package. It must be either a ClassifTask or RegrTask object.
A Learner lrn object created using mlr3 package or a GraphLearner object created using mlr3pipelines package. Multiple learners object is not supported. If left empty will select random forest by default.
A performance measure msr within the mlr3 package supported by the task. If left blank will select accuracy for classification and r-squared for regression.
Perturbation amount for feature importances during gradient approximation. It must be a value between 0.01 and 0.1. Default value is 0.05.
The minimum gain value. It must be greater than or equal to 0.001. Default value is 0.01.
The maximum gain value. It must be greater than or equal to gain.min. Default value is 1.0.
The minimum change value. It must be non-negative. Default value is 0.0.
The maximum change value. It must be greater than change.min. Default is 0.2.
The threshold value of denominator for the Barzilai-Borwein gain sequence. It must be positive. Default is 1/10^8.
Parameter for the monetone gain sequence. It must be a positive integer. Default is 100.
Parameter for the monetone gain sequence. It must be positive. Default is 0.75.
Parameter for the monetone gain sequence. It must be between (0, 1). Default is 0.6.
The factor of features to select for hot start. Must be an integer greater than 1. Default is 15.
The maximum initial number of features for automatic hot start. Must be an integer greater than 1. Default is 75.
Logical argument. Whether hot start should be used. Default is True.
Float, the initial range of imputations carried over from hot start. It must be between (0,1). Default is 0.2.
integer, The number of trees to use in the random forest hot start. The default is 50.
The gain sequence to use. Accepted methods are 'bb' for Barzilai-Borwein or 'mon' for a monetonic gain sequence. Default is 'bb'.
Number of features selected. It must be a nonnegative integer and must not exceed the total number of features in the task. A value of 0 results in automatic feature selection. Default value is 0L.
Maximum number of iterations to execute. The minimum value is 2L. Default value is 300L.
Number of iterations to stall, that is, to continue without at least stall.tolerance improvement to the measure value. The mininum value is 2L. Default value is 100L.
The maximum number of samples to select from sampling. It must be a non-negative integer. Default is 2500.
Logical argument. Include simultaneous feature weighting and selection?. Default is FALSE.
Encoding method for factor features for feature weighting, default is 'encoded'.
Logical argument. Print additional debug messages? Default value is FALSE.
Value of stall tolerance. It must be strictly positive. Default value is 1/10^8.
random state used. Default is 1.
The number of digits to round results. It must be a positive integer. Default value is 3.
Logical argument. Perform cross-validations in parallel? Default value is TRUE.
Number of cores to use in case of a parallel run. It must be less than or equal to the total number of cores on the host machine. If set to NULL when run.parallel is TRUE, it is taken as one less of the total number of cores.
If set to TRUE, iteration information is displayed at print frequency.
Iteration information printing frequency. It must be a positive integer. Default value is 10L.
The number of cross-validation folds when 'cv' is selected as perf.eval.method. The minimum value is 3L. Default value is 5L.
The number of cross-validation repetitions for feature subset evaluation. It must be a positive integer. Default value is 3L.
The number of cross-validation repetitions for gradient averaging. It must be a positive integer. Default value is 1L.
Number of gradients to average for gradient approximation. It must be a positive integer. Default value is 4L.
Performance evaluation method. It must be either 'cv' for cross-validation or 'resub' for resubstitution. Default is 'cv'.
David V. Akman et al. (2022) k-best feature selection and ranking via stochastic approximation, Expert Systems with Applications, Vol. 213. See tools:::Rd_expr_doi("10.1016/j.eswa.2022.118864")
G.F.A Yeo and V. Aksakalli (2021) A stochastic approximation approach to simultaneous feature weighting and selection for nearest neighbour learners, Expert Systems with Applications, Vol. 185. See tools:::Rd_expr_doi("10.1016/j.eswa.2021.115671")
spFeatureSelection.