partimat                package:klaR                R Documentation

_P_l_o_t_t_i_n_g _t_h_e _2-_d _p_a_r_t_i_t_i_o_n_s _o_f _c_l_a_s_s_i_f_i_c_a_t_i_o_n _m_e_t_h_o_d_s

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

     Provides a multiple figure array which shows the classification of
     observations based on  classification methods (e.g. 'lda', 'qda')
     for every combination of two variables.  Moreover, the
     classification borders are displayed and the apparent error rates
     are given in each title.

_U_s_a_g_e:

     partimat(x,...)

     ## Default S3 method:
     partimat(x, grouping, method = "lda", prec = 100, 
         nplots.vert, nplots.hor, main = "Partition Plot", name, mar, 
         plot.matrix = FALSE, ...)
     ## S3 method for class 'data.frame':
     partimat(x, ...)
     ## S3 method for class 'matrix':
     partimat(x, grouping, ..., subset, na.action = na.fail)
     ## S3 method for class 'formula':
     partimat(formula, data = NULL, ..., subset, na.action = na.fail)

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

       x: matrix or data frame containing the explanatory variables
          (required, if 'formula' is not given).

grouping: factor specifying the class for each observation (required,
          if 'formula' is not given).

 formula: formula of the form 'groups ~ x1 + x2 + ...'.  That is, the
          response is the grouping factor and the right hand side
          specifies the (non-factor) discriminators. 

  method: the method the classification is based on, currently
          supported are: 'lda', 'qda', 'rpart', 'naiveBayes',  'rda',
          'sknn' and 'svmlight'

    prec: precision used to draw the classification borders (the higher
          the more precise; default: 100).

    data: Data frame from which variables specified in formula are
          preferentially to be taken.

nplots.vert: number of rows in the multiple figure array

nplots.hor: number of columns in the multiple figure array

  subset: index vector specifying the cases to be used in the training
          sample. (Note: If given, this argument must be named.)

na.action: specify the action to be taken if 'NA's are found. The
          default action is for the procedure to fail. An alternative
          is 'na.omit', which leads to rejection of cases with missing
          values on any required variable. (Note: If given, this
          argument must be named.) 

    main: title

    name: Variable names to be printed at the axis / into the diagonal.

     mar: numerical vector of the form 'c(bottom, left, top, right)'
          which gives the lines of margin to be specified on the four
          sides of the plot. Defaults are 'rep(0, 4)' if 'plot.matrix =
          TRUE', 'c(5, 4, 2, 1) + 0.1' otherwise.

plot.matrix: logical; if 'TRUE', like a scatterplot matrix;  if 'FALSE'
          (default) uses less space and arranges the plots "optimal" 
          (using a fuzzy algorithm) in an array by plotting each pair
          of variables once.

     ...: Further arguments passed to the classification 'method'  and
          underlying plot function 'drawparti'.

_N_o_t_e:

     Warnings such as  'parameter "xyz" couldn't be set in high-level
     plot function' are expected, if making use of '...'.

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

     Karsten Luebke, luebke@statistik.uni-dortmund.de, Uwe Ligges,
     Irina Czogiel

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

     for much more fine tuning see 'drawparti'

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

     library(MASS)
     data(iris)
     partimat(Species ~ ., data = iris, method = "lda")
     ## Not run: 
     partimat(Species ~ ., data = iris, method = "lda", 
         plot.matrix = TRUE, imageplot = FALSE) # takes some time ...
     ## End(Not run)

