Parameters for Classifier Training
TrainParams-class.RdCollects 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
TrainParamsobject which stores the function which will do the classifier building and parameters that the function will use.classifierA character keyword referring to a registered classifier. See
availablefor valid keywords.balancingDefault:
"downsample". A keyword specifying how to handle class imbalance for data sets with categorical outcome. Valid values are"downsample","upsample"and"none".characteristicsA
DataFramedescribing 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.intermediateCharacter vector. Names of any variables created in prior stages by
runTestthat need to be passed toclassifier.tuneParamsA 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.
getFeaturesA 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.