assessment-class {Rmagpie} | R Documentation |
This class stores the information relevant to a microarray classification assessment: data set, classifier and options are set here and then one-layer and two-layer cross-validation can be applied.
new("assessment", dataset noFolds1stLayer=10, noFolds2ndLayer=9,
classifierName="svm", featureSelectionMethod="rfe",
typeFoldCreation="original", svmKernel="linear",
noOfRepeat=2, featureSelectionOptions)
Creates an assessment to be performed on the data set dataset
using the feature
selection options defined by featureSelectionMethod
on the feature selection method
featureSelectionMethod
and with the classifier classifierName
. Once
all the options have been selected one-layer and two-layers of cross-validation can be
performed by calling runOneLayerExtCv
and runTwoLayerExtCv
respectively.
new("assessment", dataset noFolds1stLayer=10, noFolds2ndLayer=9,
classifierName="svm", featureSelectionMethod="rfe",
typeFoldCreation="original", svmKernel="linear",
noOfRepeat=2)
If featureSelectionOptions
is not precised in the arguments then the options for
the feature selection method are determined according to the dataset
and
the featureSelectionMethod
. If RFE is selected as feature selection method
then an object of class geneSubsets is automatically created. It defines sizes of
subsets og genes for 1 to the number of features in the dataset
by power of 2.
If the feature selection method is NSC then the thresholds are taken to be the default
thresholds generated by the function pamr.train
from package pamr
applied on dataset
.
dataset
:"dataset"
. Microarray data set to be used for cross-validationnoFolds1stLayer
:numeric
. Number of folds in the inner layee layer of cross-validationnoFolds2ndLayer
:numeric
. Number of folds in one-layer cross-validation and in the
second layer of cross-validationclassifierName
:character
. Name of the classifier: 'svm' for Support Vector
Machines or 'nsc' for Nearest Shrunken CentroidfeatureSelectionMethod
:"character"
~~ typeFoldCreation
:character
. Type of fold creation: 'original', 'simple' or 'naive'svmKernel
:"character"
~~ noOfRepeat
:numeric
. Number of repeats to be performed for each cross-validation.featureSelectionOptions
:"featureSelectionOptions"
. Sizes of subsets
to be tried in the RFE or thresholds to be tried with the NSC.resultRepeated1LayerCV
:"resultRepeated1LayerCVOrNULL"
NULL is the external one layer CV has not been run yet, resultRepeated1LayerCV containing the resultsresultRepeated2LayerCV
:"result2LayerCVorNULL"
NULL is the external one layer CV has not been run yet, result2LayerCV containing the results finalClassifier
:"finalClassifierOrNULL"
NULL is the final classifier has not been determined yet, finalClassifier containing the final Classifier for each feature selection option. classifyNewSamples(assessment)
findFinalClassifier(assessment)
getClassifierName(assessment), getClassifierName(assessment)<-
getDataset(assessment), getDataset(assessment)<-
getFeatureSelectionOptions(assessment), getFeatureSelectionOptions(assessment)<-
getFinalClassifier(assessment)
getNoFolds1stLayer(assessment), getNoFolds1stLayer(assessment)<-
getNoFolds2ndLayer(assessment), getNoFolds2ndLayer(assessment)<-
getNoOfRepeats(assessment), getNoOfRepeats(assessment)<-
getResult1LayerCV(assessment)
getResults
) getResult2LayerCV(assessment)
getResults
getSvmKernel(assessment), getSvmKernel(assessment)<-
getTypeFoldCreation(assessment), getTypeFoldCreation(assessment)<-
runOneLayerExtCV
runTwoLayerExtCV
Camille Maumet
geneSubsets
, getResults-methods
,
runOneLayerExtCV-methods
, runTwoLayerExtCV-methods
#dataPath <- file.path("C:", "Documents and Settings", "c.maumet", "My Documents", "Programmation", "data") #myDataset <- new("dataset", dataId="vantVeer_70", dataPath=file.path(dataPath, "vantVeer_70")) # myDataset<-loadData(myDataset) data('vV70genesDataset') # assessment with RFE and SVM myExpe <- new("assessment", dataset=vV70genes, noFolds1stLayer=10, noFolds2ndLayer=9, classifierName="svm", typeFoldCreation="original", svmKernel="linear", noOfRepeat=2, featureSelectionOptions=new("geneSubsets", optionValues=c(1,2,3,4,5,6))) # Another assessment where the subsets are computed automatically anotherExpe <- new("assessment", dataset=vV70genes, noFolds1stLayer=10, noFolds2ndLayer=9, classifierName="svm", typeFoldCreation="original", svmKernel="linear", noOfRepeat=2) getFeatureSelectionOptions(anotherExpe, topic='maxSubsetSize') getFeatureSelectionOptions(anotherExpe, topic='subsetsSizes') # assessment with NSC expeWithNSC <- new("assessment",dataset=vV70genes, noFolds1stLayer=10, noFolds2ndLayer=9, classifierName="nsc", featureSelectionMethod='nsc', typeFoldCreation="original", svmKernel="linear", noOfRepeat=2) getFeatureSelectionOptions(expeWithNSC, topic='thresholds')