Parameters for Classifier Training
TrainParams-class.Rd
Collects and checks necessary parameters required for classifier training. The empty constructor is provided for convenience.
Constructor
TrainParams(classifier, balancing = c("downsample", "upsample", "none"), characteristics = DataFrame(), intermediate = character(0), tuneParams = NULL, getFeatures = NULL, ...)
Creates a
TrainParams
object which stores the function which will do the classifier building and parameters that the function will use.classifier
A character keyword referring to a registered classifier. See
available
for valid keywords.balancing
Default:
"downsample"
. A keyword specifying how to handle class imbalance for data sets with categorical outcome. Valid values are"downsample"
,"upsample"
and"none"
.characteristics
A
DataFrame
describing the characteristics of the classifier used. First column must be named"charateristic"
and second column must be named"value"
. If using wrapper functions for classifiers in this package, a classifier name will automatically be generated and therefore it is not necessary to specify it.intermediate
Character vector. Names of any variables created in prior stages by
runTest
that need to be passed toclassifier
.tuneParams
A list specifying tuning parameters required during feature selection. The names of the list are the names of the parameters and the vectors are the values of the parameters to try. All possible combinations are generated.
getFeatures
A function may be specified that extracts the selected features from the trained model. This is relevant if using a classifier that does feature selection within training (e.g. random forest). The function must return a list of two vectors. The first vector contains the ranked features (or empty if the training algorithm doesn't produce rankings) and the second vector contains the selected features.
...
Other named parameters which will be used by the classifier.