assessment-class           package:Rmagpie           R Documentation

_a_s_s_e_s_s_m_e_n_t: _A _c_e_n_t_r_a_l _c_l_a_s_s _t_o _p_e_r_f_o_r_m _o_n_e _a_n_d _t_w_o _l_a_y_e_r_s _o_f _e_x_t_e_r_n_a_l _c_r_o_s_s-_v_a_l_i_d_a_t_i_o_n _o_n _m_i_c_r_o_a_r_r_a_y _d_a_t_a

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

     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.

_C_r_e_a_t_i_n_g _o_b_j_e_c_t_s:

     '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'.

_S_l_o_t_s:


     '_d_a_t_a_s_e_t': Object of class '"dataset"'. Microarray data set to be
          used for cross-validation

     '_n_o_F_o_l_d_s_1_s_t_L_a_y_e_r': 'numeric'. Number of folds in the inner layee
          layer of cross-validation

     '_n_o_F_o_l_d_s_2_n_d_L_a_y_e_r': 'numeric'. Number of folds in one-layer
          cross-validation and in the second layer of cross-validation

     '_c_l_a_s_s_i_f_i_e_r_N_a_m_e': 'character'. Name of the classifier: 'svm' for
          Support Vector Machines or 'nsc' for Nearest Shrunken
          Centroid

     '_f_e_a_t_u_r_e_S_e_l_e_c_t_i_o_n_M_e_t_h_o_d': Object of class '"character"' ~~ 

     '_t_y_p_e_F_o_l_d_C_r_e_a_t_i_o_n': 'character'. Type of fold creation:
          'original', 'simple' or 'naive'

     '_s_v_m_K_e_r_n_e_l': Object of class '"character"' ~~ 

     '_n_o_O_f_R_e_p_e_a_t': 'numeric'. Number of repeats to be performed for
          each cross-validation.

     '_f_e_a_t_u_r_e_S_e_l_e_c_t_i_o_n_O_p_t_i_o_n_s': Object of class
          '"featureSelectionOptions"'. Sizes of subsets to be tried in
          the RFE or thresholds to be tried with the NSC.

     '_r_e_s_u_l_t_R_e_p_e_a_t_e_d_1_L_a_y_e_r_C_V': Object of class
          '"resultRepeated1LayerCVOrNULL"' NULL is the external one
          layer CV has not been run yet, resultRepeated1LayerCV
          containing the results

     '_r_e_s_u_l_t_R_e_p_e_a_t_e_d_2_L_a_y_e_r_C_V': Object of class '"result2LayerCVorNULL"'
          NULL is the external one layer CV has not been run yet,
          result2LayerCV containing the results 

     '_f_i_n_a_l_C_l_a_s_s_i_f_i_e_r': Object of class '"finalClassifierOrNULL"' NULL
          is the final classifier has not been determined yet,
          finalClassifier containing the final Classifier for each
          feature selection option. 

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


     '_c_l_a_s_s_i_f_y_N_e_w_S_a_m_p_l_e_s(_a_s_s_e_s_s_m_e_n_t)' Classify new samples using the
          final classifier. See related documentation.

     '_f_i_n_d_F_i_n_a_l_C_l_a_s_s_i_f_i_e_r(_a_s_s_e_s_s_m_e_n_t)' Train the final classifier
          related to an assessment based on each feature selection
          option. See related documentation

     '_g_e_t_C_l_a_s_s_i_f_i_e_r_N_a_m_e(_a_s_s_e_s_s_m_e_n_t), _g_e_t_C_l_a_s_s_i_f_i_e_r_N_a_m_e(_a_s_s_e_s_s_m_e_n_t)<-' 
          Retrieve and Modify the classifier name  associated to the
          current assessment (slot classifierName) 

     '_g_e_t_D_a_t_a_s_e_t(_a_s_s_e_s_s_m_e_n_t), _g_e_t_D_a_t_a_s_e_t(_a_s_s_e_s_s_m_e_n_t)<-' Retrieve and
          Modify the dataset associated to the current assessment (slot
          dataset), see related documentation for more details.

     '_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(_a_s_s_e_s_s_m_e_n_t), _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(_a_s_s_e_s_s_m_e_n_t)<-' 
          Retrieve and Modify the options of feature selection
          associated to the current assessment (slot
          featureSelectionOptions) 

     '_g_e_t_F_i_n_a_l_C_l_a_s_s_i_f_i_e_r(_a_s_s_e_s_s_m_e_n_t)' Retreive the final classifier
          associated with an exeperiment.

     '_g_e_t_N_o_F_o_l_d_s_1_s_t_L_a_y_e_r(_a_s_s_e_s_s_m_e_n_t), _g_e_t_N_o_F_o_l_d_s_1_s_t_L_a_y_e_r(_a_s_s_e_s_s_m_e_n_t)<-' 
          Retrieve and Modify the number of folds in the inner layer of
          cross-validation (slot nbFolds1stLayer) 

     '_g_e_t_N_o_F_o_l_d_s_2_n_d_L_a_y_e_r(_a_s_s_e_s_s_m_e_n_t), _g_e_t_N_o_F_o_l_d_s_2_n_d_L_a_y_e_r(_a_s_s_e_s_s_m_e_n_t)<-' 
          Retrieve and Modify the number of folds in the outer layer of
          cross-validation (slot nbFolds1stLayer) 

     '_g_e_t_N_o_O_f_R_e_p_e_a_t_s(_a_s_s_e_s_s_m_e_n_t), _g_e_t_N_o_O_f_R_e_p_e_a_t_s(_a_s_s_e_s_s_m_e_n_t)<-' 
          Retrieve and Modify the number of repeats of each
          cross-validation (slot nbOfRepeat) 

     '_g_e_t_R_e_s_u_l_t_1_L_a_y_e_r_C_V(_a_s_s_e_s_s_m_e_n_t)' Retrieve the results of the
          one-layer cross validation (slot resultRepeated1LayerCV). An
          easier access to this data is available via the method
          'getResults' ) 

     '_g_e_t_R_e_s_u_l_t_2_L_a_y_e_r_C_V(_a_s_s_e_s_s_m_e_n_t)' Retrieve the results of the
          two-layers cross validation (slot result2LayerCV). An easier
          access to this data is available via the method 'getResults'

     _g_e_t_R_e_s_u_l_t_s User-friendly methods to retreive data in the results
          of one-layer and two-layers of cross-validation. See related
          documentation page.

     '_g_e_t_S_v_m_K_e_r_n_e_l(_a_s_s_e_s_s_m_e_n_t), _g_e_t_S_v_m_K_e_r_n_e_l(_a_s_s_e_s_s_m_e_n_t)<-' 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) 

     '_g_e_t_T_y_p_e_F_o_l_d_C_r_e_a_t_i_o_n(_a_s_s_e_s_s_m_e_n_t), _g_e_t_T_y_p_e_F_o_l_d_C_r_e_a_t_i_o_n(_a_s_s_e_s_s_m_e_n_t)<-' 
          Retrieve and Modify the type of folds creation to use for
          each cross-validation (slot typeFoldCreation) 

     '_r_u_n_O_n_e_L_a_y_e_r_E_x_t_C_V' Run one-layer cross-validation, see related
          documantation for more details.

     '_r_u_n_T_w_o_L_a_y_e_r_E_x_t_C_V' Run two-layer cross-validation, see related
          documantation for more details.

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

     Camille Maumet

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

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

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

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

