setFeatureSelectionOptions-methods  package:Rmagpie  R Documentation

_g_e_t_F_e_a_t_u_r_e_S_e_l_e_c_t_i_o_n_O_p_t_i_o_n_s<- _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 _f_e_a_t_u_r_e_S_e_l_e_c_t_i_o_n_O_p_t_i_o_n_s _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
     the object of class featureSelectionOptions related to a
     particular assessment, directly from this object assessment. The
     argument 'topic' specifies which part of the
     featureSelectionOptions is of interest. 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: 'Object of class assessment'. Object assessment of interest

   topic: 'character'. Optional argument that specifies which attribute
          of the featureSelectionOptions must be replaced, the possible
          values are: '"optionValues"' (slot 'optionValues' of the
          featureSelectionOptions), '"noOfOptions"' (slot 'noOfOptions'
          of the featureSelectionOptions), if the
          featureSelectionOptions object is an object of class
          'geneSubsets', then the following values are also available
          for the argument 'topic'  '"subsetsSizes"' (slot
          'optionValues' of the geneSubsets), '"noModels"' (slot
          'noOfOptions' of the geneSubsets), '"maxSubsetSize"' (slot
          'maxSelectedFeatures' of the geneSubsets), '"speed"' (slot
          'speed' of the featureSelectionOptions), if the
          featureSelectionOptions object is an object of class
          'thresholds', then the following values are also available
          for the argument 'topic'  '"thresholds"' (slot 'optionValues'
          of the object thresholds), '"noThresholds"' (slot
          'noOfOptions' of the object thresholds)

          if the 'topic' is missing then the whole
          featureSelectionOptions object is replaced.

_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 featureSelectionOptions'
     featureSelectionOptions corresponding to the assessment is
     replaced by 'value'.

     If 'topic' is '"optionValues"' 'numeric' Slot 'optionValues' of
     the featureSelectionOptions is replaced by 'value'.

     If 'topic' is "noOfOptions" 'numeric' Slot 'noOfOptions' of the
     featureSelectionOptions is replaced by 'value'.

     If 'object' is of class 'geneSubsets' and 'topic' is
     "maxSubsetSize" 'numeric' Slot 'maxSubsetSize' of the geneSubsets
     is replaced by 'value'.

     If 'object' is of class 'geneSubsets' and 'topic' is
     "subsetsSizes" 'numeric' Slot 'optionValues' of the geneSubsets is
     replaced by 'value'.

     If 'object' is of class 'geneSubsets' and 'topic' is "noModels"
     'numeric'Slot 'noOfOptions'  of the geneSubsets is replaced by
     'value'.

     If 'object' is of class 'geneSubsets' and 'topic' is "speed"
     'numeric' Slot 'speed'  of the geneSubsets is replaced by 'value'.

     If 'object' is of class 'thresholds' and 'topic' is "thresholds"
     'numeric' Slot 'optionValues' of the object of class thresholds is
     replaced by 'value'.

     If 'object' is of class 'thresholds' and 'topic' is "noThresholds"
     'numeric' Slot 'noOfOptions' of the object of class thresholds 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" The 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:

     'featureSelectionOptions', 'assessment'

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

     # With an assessment using RFE
     data('vV70genesDataset')

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

     # Modify the size of the biggest subset
     getFeatureSelectionOptions(myExpe, topic='maxSubsetSize') <- 70
     getFeatureSelectionOptions(myExpe, topic='maxSubsetSize')
     # Modify all the sizes of subsets
     getFeatureSelectionOptions(myExpe, topic='subsetsSizes') <- c(1,5,10,25,30)
     getFeatureSelectionOptions(myExpe, topic='subsetsSizes')
     # Modify the speed
     getFeatureSelectionOptions(myExpe, topic='speed') <- 'slow'
     getFeatureSelectionOptions(myExpe, topic='speed')
     # Modify the entire geneSubsets
     getFeatureSelectionOptions(myExpe) <- mySubsets
     getFeatureSelectionOptions(myExpe, topic='maxSubsetSize')
     getFeatureSelectionOptions(myExpe, topic='subsetsSizes')
     getFeatureSelectionOptions(myExpe, topic='speed')
     getFeatureSelectionOptions(myExpe, topic='noModels')

     # With an assessment using NSC as a feature selection method
     myThresholds <- new("thresholds", optionValues=c(0.1,0.2,0.3))
     myExpe2 <- new("assessment", dataset=vV70genes,
                                        noFolds1stLayer=10,
                                        noFolds2ndLayer=9,
                                        classifierName="nsc",
                                        featureSelectionMethod='nsc',
                                        typeFoldCreation="original",
                                        svmKernel="linear",
                                        noOfRepeat=2,
                                        featureSelectionOptions=myThresholds)

     otherThresholds <- new("thresholds", optionValues=c(0,0.5,1,1.5,2,2.5,3))
     # Modify the whole object 'featureSelectionOptions' (an object of class thresholds)
     getFeatureSelectionOptions(myExpe2) <- otherThresholds
     getFeatureSelectionOptions(myExpe2, topic='thresholds')
     getFeatureSelectionOptions(myExpe2, topic='noThresholds')

