classifyNewSamples-methods {Rmagpie} | R Documentation |
classifyNewSamples Method to classify new samples for a given assessment
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
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)
[Package
Rmagpie version 1.0.0
Index]