Skip to contents

Collects and checks necessary parameters required for feature selection. Either one function is specified or a list of functions to perform ensemble feature selection. The empty constructor is provided for convenience.

Constructor

SelectParams(featureRanking, characteristics = DataFrame(), nFeatures = 20, minPresence = 1, intermediate = character(0), subsetToSelections = TRUE, tuneParams = list(nFeatures = seq(10, 100, 10)), ...)

Creates a SelectParams object which stores the function(s) which will do the selection and parameters that the function will use.

featureRanking

A character keyword referring to a registered feature ranking function. See available for valid keywords.

characteristics

A DataFrame describing the characteristics of feature selection to be done. First column must be named "charateristic" and second column must be named "value". If using wrapper functions for feature selection in this package, the feature selection name will automatically be generated and therefore it is not necessary to specify it.

nFeatures

Default: 20. The number of top-ranked features to choose. Can also be NULL if a vector of top numbers is specified to tuneParams for the list element named nFeatures.

minPresence

Default: 1. If a list of functions was provided, how many of those must a feature have been selected by to be used in classification. 1 is equivalent to a set union and a number the same length as featureSelection is equivalent to set intersection.

intermediate

Character vector. Names of any variables created in prior stages by runTest that need to be passed to a feature selection function.

subsetToSelections

Whether to subset the data table(s), after feature selection has been done.

tuneParams

A list specifying tuning parameters to try during feature selection. A list element named nFeatures is used to represent a variety of top-n ranked features to try. Other names of the list are the names of the parameters of the ranking function and the vectors are the values of the ranking function's parameters to try. All possible combinations are generated.

...

Other named parameters which will be used by the selection function. If featureSelection was a list of functions, this must be a list of lists, as long as featureSelection.

Summary

selectParams is a SelectParams object.

show(SelectParams): Prints a short summary of what selectParams contains.

Author

Dario Strbenac

Examples


  #if(require(sparsediscrim))
  #{
    SelectParams("KS")
#> An object of class 'SelectParams'.
#> Selection Name: Kolmogorov-Smirnov Test.
    
    # Ensemble feature selection.
    SelectParams(list("Bartlett", "Levene"))
#> An object of class 'SelectParams'.
#> Ensemble Selection: Bartlett Test, Levene Test.
#> Minimum Functions Selected By: 1
  #}