setDataset-methods: getDataset<- Method to modify the attributes of a dataset...

Description Arguments Value Methods Author(s) See Also Examples

Description

This method provides an easy interface to modify the attributes of a dataset directly from an object assessment. The argument topic specifies which part of the dataset should be modified. This method is only available none of the one-layer CV or two-layers CV have been performed and the final classifier has not been determined yet.

Arguments

object

class assessment. Object assessment of interest

topic

character. Optional argument that specifies which attribute of the dataset must be changed, the possible values are dataId (slot dataId of the dataset), dataPath (slot dataPath of the dataset), geneExprFile (slot geneExprFile of the dataset), classesFile (slot classesFile of the dataset), if the topic is missing then the whole dataset object is replaced.

value

The replacement value.

Value

The methods modifies the object of class assessment and returned the slot modified accordingly to the request provided by topic.

If 'topic' is missing object of class dataset the dataset corresponding to the assessment is replaced by 'value'.

If 'topic' is "dataId" object of class character the 'dataId' of the dataset is replaced by 'value'

If 'topic' is "dataPath" object of class character the 'dataPath' of the dataset is replaced by 'value'

If 'topic' is "geneExprFile" object of class character the 'geneExprFile' of the dataset is replaced by 'value'

If 'topic' is "classesFile" object of class character the 'classesFile' of the dataset is replaced by 'value'

Methods

object = "assessment"

This method is only applicable on objects of class assessment.

Author(s)

Camille Maumet

See Also

assessment, getDataset-methods

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## Not run: 
aDataset <- new("dataset", dataId="vantVeer_70", dataPath="pathToFile")
aDataset <- loadData(aDataset)

expeOfInterest <- new("assessment", dataset=aDataset,
                                   noFolds1stLayer=10,
                                   noFolds2ndLayer=9,
                                   classifierName="svm",
                                   typeFoldCreation="original",
                                   svmKernel="linear",
                                   noOfRepeat=2,
                                   featureSelectionOptions=new("geneSubsets", optionValues=c(1,2,3,4,5,6)))

# Modify the dataId
getDataset(expeOfInterest, topic='dataId') <- "khan"
getDataset(expeOfInterest, 'dataId')

# Replace the dataset
getDataset(expeOfInterest) <- aDataset
getDataset(expeOfInterest, 'dataId')

## End(Not run)

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