Description Usage Arguments Details Value Author(s) Examples
The features are described by a data frame. One column is named "dataset" and the other is named "feature". This provides identifiability in case when multiple types of data have features with the same name.
1 2 | ## S4 method for signature 'EasyHardClassifier'
easyHardFeatures(easyHardClassifier)
|
easyHardClassifier |
An |
.
If any of the features are from the colun data of the input MultiAssayExperiment
, the dataset value will be "clinical".
To be consistent with other functions for extracting features from a trained model, a list of length two. The first element is for feature rankings, which is not meaningful for an easy-hard classifier, so it is NULL
. The second element is the selected features.
Dario Strbenac
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | genesMatrix <- matrix(c(rnorm(90, 9, 1),
9.5, 9.4, 5.2, 5.3, 5.4, 9.4, 9.6, 9.9, 9.1, 9.8),
ncol = 10, byrow = TRUE)
colnames(genesMatrix) <- paste("Sample", 1:10)
rownames(genesMatrix) <- paste("Gene", 1:10)
genders <- factor(c("Male", "Male", "Female", "Female", "Female",
"Female", "Female", "Female", "Female", "Female"))
# Scenario: Male gender can predict the hard-to-classify Sample 1.
clinical <- DataFrame(age = c(31, 34, 32, 39, 33, 38, 34, 37, 35, 36),
gender = genders,
class = factor(rep(c("Poor", "Good"), each = 5)),
row.names = colnames(genesMatrix))
dataset <- MultiAssayExperiment(ExperimentList(RNA = genesMatrix), clinical)
trained <- easyHardClassifierTrain(dataset, easyClassifierParams = list(minCardinality = 2, minPurity = 0.9),
hardClassifierParams = list(SelectParams(featureSelection = differentMeansSelection,
selectionName = "Difference in Means",
resubstituteParams = ResubstituteParams(1:10, "balanced error", "lower")), TrainParams(), PredictParams()))
easyHardFeatures(trained)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.