Apply a classification method after a subset of features has been selected.
FEATURESELECTION(
train,
labels,
algorithm = c("ranking", "forward", "backward", "exhaustive"),
unieval = if (algorithm[1] == "ranking") fseval.univariate() else NULL,
uninb = NULL,
unithreshold = NULL,
multieval = fseval.multivariate(),
wrapmethod = NULL,
mainmethod = wrapmethod,
tune = FALSE,
methodparameters = NULL,
graph = FALSE,
seed = NULL,
...
)The training set (description), as a data.frame.
Class labels of the training set (vector or factor).
The feature selection algorithm.
The (univariate) evaluation criterion. uninb, unithreshold or multieval must be specified.
The number of selected feature (univariate evaluation).
The threshold for selecting feature (univariate evaluation).
The (multivariate) evaluation criterion.
The classification method used for the wrapper evaluation.
The final method used for data classification (required: either mainmethod or wrapmethod must be a valid classification/regression function, e.g. LDA, NB, ...). If a wrapper evaluation is used, the same classification method should be used.
If true, the function returns parameters instead of a classification model.
Pre-tuned parameters, as returned by the same method called with
tune = TRUE. performance obtains them once and passes them back when
fitting, so that the tuning is not redone on every split. A method with nothing to tune
returns an empty object, which leaves its defaults untouched.
Whether the method draws the graphic that goes with its tuning (the cross-validation curve, typically). Methods that have no such graphic accept the argument and ignore it.
A specified seed for random number generation, so that two runs on the same data give the same model. Every learning method accepts it, so that it can be set the same way whatever the method; the deterministic ones simply have nothing to draw and give the same model with or without it.
Other parameters.
selectfeatures, predict.selection, selection-class
if (FALSE) {
require (datasets)
data (iris)
FEATURESELECTION (iris [, -5], iris [, 5], uninb = 2, mainmethod = LDA)
}
Run the code above in your browser using DataLab