setDataset-methods          package:Rmagpie          R Documentation

_g_e_t_D_a_t_a_s_e_t<- _M_e_t_h_o_d _t_o _m_o_d_i_f_y _t_h_e _a_t_t_r_i_b_u_t_e_s _o_f _a _d_a_t_a_s_e_t _f_r_o_m _a_n _a_s_s_e_s_s_m_e_n_t

_D_e_s_c_r_i_p_t_i_o_n:

     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.

_A_r_g_u_m_e_n_t_s:

  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.

_V_a_l_u_e:

     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'

_M_e_t_h_o_d_s:


     _o_b_j_e_c_t = "_a_s_s_e_s_s_m_e_n_t" This method is only applicable on objects of
          class assessment.

_A_u_t_h_o_r(_s):

     Camille Maumet

_S_e_e _A_l_s_o:

     'assessment',  'getDataset-methods'

_E_x_a_m_p_l_e_s:

     ## 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)

