if(require(sparsediscrim))
{
# First 25 samples are mixtures of two normals. Last 25 samples are one normal.
genesMatrix <- sapply(1:25, function(geneColumn) c(rnorm(50, 5, 1), rnorm(50, 15, 1)))
genesMatrix <- cbind(genesMatrix, sapply(1:25, function(geneColumn) rnorm(100, 9, 3)))
classes <- factor(rep(c("Poor", "Good"), each = 25))
DMDselection(genesMatrix, classes,
trainParams = TrainParams(), predictParams = PredictParams(),
resubstituteParams = ResubstituteParams(nFeatures = seq(10, 100, 10), performanceType = "balanced", better = "lower"))
}
Run the code above in your browser using DataLab