DMDselection {ClassifyR} | R Documentation |
Ranks features by largest Differences in Means/Medians and Deviations and chooses the features which have best resubstitution performance.
## S4 method for signature 'matrix' DMDselection(measurements, classes, ...) ## S4 method for signature 'DataFrame' DMDselection(measurements, classes, datasetName, differences = c("both", "location", "scale"), trainParams, predictParams, resubstituteParams, ..., selectionName = "Differences of Medians and Deviations", verbose = 3) ## S4 method for signature 'MultiAssayExperiment' DMDselection(measurements, targets = names(measurements), ...)
measurements |
Either a |
classes |
A vector of class labels. |
targets |
If |
... |
Variables not used by the |
datasetName |
Default: |
differences |
Default: |
trainParams |
A container of class |
predictParams |
A container of class |
resubstituteParams |
An object of class |
selectionName |
A name to identify this selection method by. Stored in the result. |
verbose |
Default: 3. A number between 0 and 3 for the amount of progress messages to give. This function only prints progress messages if the value is 3. |
DMD is defined as |location1 - location2| + |scale1 - scale2|. The subscripts denote the group which the parameter is calculated for.
Data tables which consist entirely of non-numeric data cannot be analysed. If measurements
is an object of class MultiAssayExperiment
, the factor of sample classes must be stored
in the DataFrame accessible by the colData
function with column name "class"
.
An object of class SelectResult
or a list of such objects, if the classifier which was
used for determining the specified performance metric made a number of prediction varieties.
Dario Strbenac
# First 20 features have bimodal distribution for Poor class. # Other 80 features have normal distribution for both classes. genesMatrix <- sapply(1:25, function(sample) { randomMeans <- sample(c(8, 12), 20, replace = TRUE) c(rnorm(20, randomMeans, 1), rnorm(80, 10, 1)) } ) genesMatrix <- cbind(genesMatrix, sapply(1:25, function(sample) rnorm(100, 10, 1))) classes <- factor(rep(c("Poor", "Good"), each = 25)) resubstituteParams <- ResubstituteParams(nFeatures = seq(10, 100, 10), performanceType = "balanced error", better = "lower") DMDselection(genesMatrix, classes, datasetName = "Example", trainParams = TrainParams(naiveBayesKernel), predictParams = PredictParams(NULL, getClasses = function(result) result), resubstituteParams = resubstituteParams)