classifyNewSamples-methods: classifyNewSamples Method to classify new samples for a given...

Description Arguments Methods Examples

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 assessment. Object assessment 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 assessment. 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 = "assessment"

This method is only applicable on objects of class assessment.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
data('vV70genesDataset')

expeOfInterest <- new("assessment", 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)

Rmagpie documentation built on Nov. 8, 2020, 11:09 p.m.