Planarplot                package:CMA                R Documentation

_V_i_s_u_a_l_i_z_e _S_e_p_a_r_a_b_i_l_i_t_y _o_f _d_i_f_f_e_r_e_n_t _c_l_a_s_s_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     Given two variables, the methods trains a classifier (argument
     'classifier') based on these two variables and plots the resulting
     class regions, learning- and test observations in the plane.

     Appropriate variables are usually found by 'GeneSelection'.

     For S4 method information, s. 'Planarplot-methods'.

_U_s_a_g_e:

     Planarplot(X, y, f, learnind, predind, classifier, gridsize = 100, ...)

_A_r_g_u_m_e_n_t_s:

       X: Gene expression data. Can be one of the following:

             *  A 'matrix'. Rows correspond to observations, columns to
                variables.

             *  A 'data.frame', when 'f' is _not_ missing (s. below).

             *  An object of class 'ExpressionSet'.

       y: Class labels. Can be one of the following:

             *  A 'numeric' vector.

             *  A 'factor'.

             *  A 'character' if 'X' is an 'ExpressionSet' that
                specifies the phenotype variable.

             *  'missing', if 'X' is a 'data.frame' and a proper
                formula 'f' is provided.

       f: A two-sided formula, if 'X' is a 'data.frame'. The left part
          correspond to class labels, the right to variables.

learnind: An index vector specifying the observations that belong to
          the learning set. May be 'missing'; in that case, the
          learning set consists of all observations and predictions are
          made on the learning set.

 predind: A vector containing _exactly_ two indices that denote the two
          variables used for classification.

classifier: Name of function ending with 'CMA' indicating the
          classifier to be used.

gridsize: The gridsize used for two-dimensional plotting.

          For both variables specified in 'predind', an equidistant
          grid of size 'gridsize' is created. The resulting two grids
          are then combined to obtain 'gridsize^2' points in the real
          plane which are used to draw the class regions. Defaults to
          100 which is usually a reasonable choice, but takes some
          time.

     ...: Further argument passed to 'classifier'.

_V_a_l_u_e:

     No return.

_A_u_t_h_o_r(_s):

     Martin Slawski martin.slawski@campus.lmu.de

     Anne-Laure Boulesteix <URL: http://www.slcmsr.net/boulesteix>.
     Idea is from the 'MLInterfaces' package, contributed by Jess Mar,
     Robert Gentleman and Vince Carey.

_S_e_e _A_l_s_o:

     'GeneSelection', 'compBoostCMA', 'dldaCMA', 'ElasticNetCMA',
     'fdaCMA', 'flexdaCMA', 'gbmCMA', 'knnCMA', 'ldaCMA', 'LassoCMA',
     'nnetCMA', 'pknnCMA', 'plrCMA', 'pls_ldaCMA', 'pls_lrCMA',
     'pls_rfCMA', 'pnnCMA', 'qdaCMA', 'rfCMA', 'scdaCMA',
     'shrinkldaCMA', 'svmCMA'

_E_x_a_m_p_l_e_s:

     ### simple linear discrimination for the golub data:
     data(golub)
     golubY <- golub[,1]
     golubX <- as.matrix(golub[,-1])
     golubn <- nrow(golubX)
     set.seed(111)
     learnind <- sample(golubn, size=floor(2/3*golubn))
     Planarplot(X=golubX, y=golubY, learnind=learnind, predind=c(2,4),
                classifier=ldaCMA)

