##########################
## Classifier training
##########################
# Load an expressionSet:
library(leukemiasEset)
data(leukemiasEset)
# Select the train samples:
trainSamples <- c(1:10, 13:22, 25:34, 37:46, 49:58)
# Train a classifier or load a trained one:
# leukemiasClassifier <- geNetClassifier(leukemiasEset[,trainSamples],
# sampleLabels="LeukemiaType", plotsName="leukemiasClassifier")
data(leukemiasClassifier) # Sample trained classifier
##########################
## Classifier query
##########################
# Select the samples to query the classifier
# - Real use: samples whose class we want to known
querySamples <- "GSM330154.CEL"
# - External validation: samples not used for training
querySamples <- c(1:60)[-trainSamples]
# Make a query to the classifier:
queryResult <- queryGeNetClassifier(leukemiasClassifier, leukemiasEset[,querySamples])
##########################
## Query Summary
##########################
# Obtain an overview of the results
querySummary(queryResult)
Run the code above in your browser using DataLab