getFinalClassifier-methods      package:Rmagpie      R Documentation

_g_e_t_F_i_n_a_l_C_l_a_s_s_i_f_i_e_r _M_e_t_h_o_d _t_o _a_c_c_e_s_s _t_h_e _a_t_t_r_i_b_u_t_e_s _o_f _a _f_i_n_a_l_C_l_a_s_s_i_f_i_e_r _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 access the attributes of
     the object of class finalClassifier related to a particular
     assessment, directly from this object assessment. The argument
     'topic' specifies which part of the finalClassifier is of
     interest.

_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 finalClassifier is requested, the possible values are
          'genesFromBestToWorst' (slot 'genesFromBestToWorst' of the
          finalClassifier), 'models' (slot 'models' of the
          finalClassifier), if the 'topic' is missing then the whole
          finalClassifier object is returned.

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

     The value returned by the method changes accordingly to the 
     'topic' argument.

     If  'topic' is missing 'object of class finalClassifier' the
     finalClassifier corresponding to the assessment of interest

     If  'topic' is  '"genesFromBestToWorst"' 'numeric' corresponding
     to the 'genesFromBestToWorst' of the finalClassifier

     If  'topic' is  '"models"' 'numeric' corresponding to the 'models'
     of the finalClassifier

_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:

     'finalClassifier', 'assessment'

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

     #dataPath <- file.path("C:", "Documents and Settings", "c.maumet", "My Documents", "Programmation", "Sources", "SVN", "R package", "data")
     #aDataset <- new("dataset", dataId="vantVeer_70", dataPath=dataPath)
     #aDataset <- loadData(aDataset)

     mySubsets <- new("geneSubsets", optionValues=c(1,2,3,4,5,6))
     data('vV70genesDataset')

     # assessment with RFE and SVM
     expeOfInterest <- new("assessment", dataset=vV70genes,
                                    noFolds1stLayer=10,
                                    noFolds2ndLayer=9,
                                    classifierName="svm",
                                    typeFoldCreation="original",
                                    svmKernel="linear",
                                    noOfRepeat=2,
                                    featureSelectionOptions=mySubsets)

     expeOfInterest <- findFinalClassifier(expeOfInterest)

     # Return the whole object of class finalClassifier
     getFinalClassifier(expeOfInterest)
     getFinalClassifier(expeOfInterest, 'genesFromBestToWorst')
     getFinalClassifier(expeOfInterest, 'models')

     # assessment with NSC
     expeOfInterest <- new("assessment", dataset=vV70genes,
                                    noFolds1stLayer=10,
                                    noFolds2ndLayer=9,
                                    featureSelectionMethod='nsc',
                                    classifierName="nsc",
                                    typeFoldCreation="original",
                                    svmKernel="linear",
                                    noOfRepeat=2,
                                    featureSelectionOptions=new("thresholds"))

     expeOfInterest <- findFinalClassifier(expeOfInterest)

     # Return the whole object of class finalClassifier
     getFinalClassifier(expeOfInterest)
     getFinalClassifier(expeOfInterest, 'genesFromBestToWorst')
     getFinalClassifier(expeOfInterest, 'models')

