Description Usage Arguments Details Value Author(s) Examples
Ranks features by largest Levene statistic and chooses the features which have best resubstitution performance.
1 2 3 4 5 6 7 8 | ## S4 method for signature 'matrix'
leveneSelection(measurements, classes, ...)
## S4 method for signature 'DataFrame'
leveneSelection(measurements, classes, datasetName,
trainParams, predictParams, resubstituteParams,
selectionName = "Levene Test", verbose = 3)
## S4 method for signature 'MultiAssayExperiment'
leveneSelection(measurements, targets = names(measurements), ...)
|
measurements |
Either a |
classes |
Either a vector of class labels of class |
targets |
If |
... |
Variables not used by the |
datasetName |
A name for the data set used. Stored in the result. |
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. |
Levene's statistic for unequal variance between groups is a robust version of Bartlett's statistic.
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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | # First 20 features have bimodal distribution for Poor class.
# Other 80 features have normal distribution for both classes.
set.seed(1984)
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)))
rownames(genesMatrix) <- paste("Gene", 1:nrow(genesMatrix))
classes <- factor(rep(c("Poor", "Good"), each = 25))
genesMatrix <- subtractFromLocation(genesMatrix, 1:ncol(genesMatrix))
resubstituteParams <- ResubstituteParams(nFeatures = seq(10, 100, 10),
performanceType = "balanced error",
better = "lower")
selected <- leveneSelection(genesMatrix, classes, "Example",
trainParams = TrainParams(fisherDiscriminant),
predictParams = PredictParams(NULL),
resubstituteParams = resubstituteParams)
selected@chosenFeatures
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.