experiment-class: assessment: A central class to perform one and two layers of...

Description Creating objects Slots Methods Author(s) See Also Examples

Description

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.

Creating objects

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.

Slots

dataset:

Object of class "dataset". Microarray data set to be used for cross-validation

noFolds1stLayer:

numeric. Number of folds in the inner layee layer of cross-validation

noFolds2ndLayer:

numeric. Number of folds in one-layer cross-validation and in the second layer of cross-validation

classifierName:

character. Name of the classifier: 'svm' for Support Vector Machines or 'nsc' for Nearest Shrunken Centroid

featureSelectionMethod:

Object of class "character" ~~

typeFoldCreation:

character. Type of fold creation: 'original', 'simple' or 'naive'

svmKernel:

Object of class "character" ~~

noOfRepeats:

numeric. Number of repeats to be performed for each cross-validation.

featureSelectionOptions:

Object of class "featureSelectionOptions". Sizes of subsets to be tried in the RFE or thresholds to be tried with the NSC.

resultRepeated1LayerCV:

Object of class "resultRepeated1LayerCVOrNULL" NULL is the external one layer CV has not been run yet, resultRepeated1LayerCV containing the results

resultRepeated2LayerCV:

Object of class "result2LayerCVorNULL" NULL is the external one layer CV has not been run yet, result2LayerCV containing the results

finalClassifier:

Object of class "finalClassifierOrNULL" NULL is the final classifier has not been determined yet, finalClassifier containing the final Classifier for each feature selection option.

Methods

classifyNewSamples(assessment)

Classify new samples using the final classifier. See related documentation.

findFinalClassifier(assessment)

Train the final classifier related to an assessment based on each feature selection option. See related documentation

getClassifierName(assessment), getClassifierName(assessment)<-

Retrieve and Modify the classifier name associated to the current assessment (slot classifierName)

getDataset(assessment), getDataset(assessment)<-

Retrieve and Modify the dataset associated to the current assessment (slot dataset), see related documentation for more details.

getFeatureSelectionOptions(assessment), getFeatureSelectionOptions(assessment)<-

Retrieve and Modify the options of feature selection associated to the current assessment (slot featureSelectionOptions)

getFinalClassifier(assessment)

Retreive the final classifier associated with an exeperiment.

getNoFolds1stLayer(assessment), getNoFolds1stLayer(assessment)<-

Retrieve and Modify the number of folds in the inner layer of cross-validation (slot nbFolds1stLayer)

getNoFolds2ndLayer(assessment), getNoFolds2ndLayer(assessment)<-

Retrieve and Modify the number of folds in the outer layer of cross-validation (slot nbFolds1stLayer)

getNoOfRepeats(assessment), getNoOfRepeats(assessment)<-

Retrieve and Modify the number of repeats of each cross-validation (slot nbOfRepeat)

getResult1LayerCV(assessment)

Retrieve the results of the one-layer cross validation (slot resultRepeated1LayerCV). An easier access to this data is available via the method getResults )

getResult2LayerCV(assessment)

Retrieve the results of the two-layers cross validation (slot result2LayerCV). An easier access to this data is available via the method getResults

getResults

User-friendly methods to retreive data in the results of one-layer and two-layers of cross-validation. See related documentation page.

getSvmKernel(assessment), getSvmKernel(assessment)<-

Retrieve and Modify the svm kernel used as a final classifier if svm is the concerned classifier and during the Recusrsive Feature Elimination (slot svmKernel)

getTypeFoldCreation(assessment), getTypeFoldCreation(assessment)<-

Retrieve and Modify the type of folds creation to use for each cross-validation (slot typeFoldCreation)

runOneLayerExtCV

Run one-layer cross-validation, see related documantation for more details.

runTwoLayerExtCV

Run two-layer cross-validation, see related documantation for more details.

Author(s)

Camille Maumet

See Also

geneSubsets, getResults-methods, runOneLayerExtCV-methods, runTwoLayerExtCV-methods

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#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')

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