Learn R Programming

ClassifyR (version 1.6.2)

SelectParams: Parameters for Feature Selection

Description

Collects and checks necessary parameters required for feature selection. The empty constructor is provided for convenience.

Arguments

Constructor

SelectParams() Creates a default SelectParams object. This uses a limma t-test and tries 100, 200, 300, 400, 500 features, and picks the number of features with the best resubstitution error rate. Users should create an appropriate SelectParams object for the characteristics of their data, once they are familiar with this software.
SelectParams(featureSelection, selectionName, minPresence = 1, intermediate = character(0), subsetExpressionData = TRUE, ...) Creates a SelectParams object which stores the function which will do the selection and parameters that the function will use.
featureSelection
Either a function which will do the selection or a list of such functions. For a particular function, the first argument must be an ExpressionSet object. The function's return value must be a vector of row indices of genes that were selected.
selectionName
A name to identify this selection method by.
minPresence
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.
subsetExpressionData
Whether to subset the expression data, after selection has been done.
...
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.

Examples

Run this code
  if(require(sparsediscrim))
  {
    SelectParams(limmaSelection, "t-test",
                 trainParams = TrainParams(), predictParams = PredictParams(),
                 resubstituteParams = ResubstituteParams())
    
    # For pamr shrinkage selection.
    SelectParams(nearestShrunkenCentroidSelectionInterface, datasetName = "Ovarian Cancer",
                 intermediate = "trained", subsetExpressionData = FALSE)
  }

Run the code above in your browser using DataLab