classifyNewSamples-methods(magpie)R Documentation

classifyNewSamples Method to classify new samples for a given experiment

Description

This method classify one or several new samples provided in the file 'newSamplesFile' using the final classifier build by 'findFinalClassifier'.

Arguments

object object of class experiment. Object experiment of interest
newSamplesFile character. URL of the file containing the gene expressions of the samples to be classified. The first line of the file must corresponds to the sample names and the first column to the names of the genes.
optionValue numeric. Size of subset (for RFE-SVM) or threshold (for NSC) to be considered, the option value must be available in the slot featureSelectionOptions of the experiment. If not, the smallest value bigger than 'optionValue' is selected. If this argument is missing the best option value according to one-layer cross-validation is used.

Methods

object = "experiment"
This method is only applicable on objects of class experiment.

Examples


data('vV70genesDataset')

expeOfInterest <- new("experiment", dataset=vV70genes,
                                   noFolds1stLayer=10,
                                   noFolds2ndLayer=9,
                                   classifierName="svm",
                                   typeFoldCreation="original",
                                   svmKernel="linear",
                                   noOfRepeat=2,
                                   featureSelectionOptions=new("geneSubsets", optionValues=c(1,2,4,8,16,32,64,70)))

# Build the final classifier
expeOfInterest <- findFinalClassifier(expeOfInterest)

## Not run: 
classifyNewSamples(expeOfInterest, "pathToFile/testSamples_geneExpr.txt", 4)
## End(Not run)
expeOfInterest <- runOneLayerExtCV(expeOfInterest)
## Not run: 
classifyNewSamples(expeOfInterest, "pathToFile/testSamples_geneExpr.txt")
## End(Not run)

[Package magpie version 0.1.1 Index]