confus                package:labdsv                R Documentation

_C_o_n_f_u_s_i_o_n _M_a_t_r_i_x

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

     A confusion matrix is a cross-tabulation of actual class
     membership with memberships predicted by a disciminant function, 
     classification tree, or other predictive model.

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

     confus(class,fitted)

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

   class: a vector of (integer) class membership values

  fitted: a matrix of predicted class memberships

_D_e_t_a_i_l_s:

     Cross-classifies each sample by actual class membership and 
     predicted membership, computing overall accuracy, and the Kappa 
     statistic of agreement.

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

     produces a list with elements 

  matrix: the cross-tabulation matrix

 correct: the fraction of correctly predicted samples

   kappa: the value of the Kappa statistic

  legend: the text legend for the cross-tabulation matrix

     normal-bracket20bracket-normal

_N_o_t_e:

     Confusion matrices are commonly computed in remote sensing
     applications, but are equally suited to the evaluation of any 
     predictive methods of class membership or factors.

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

     David W. Roberts droberts@montana.edu <URL:
     http://ecology.msu.montana.edu/labdsv>

_R_e_f_e_r_e_n_c_e_s:

     <URL: http://ecology.montana.msu.edu/labdsv/confus.html>

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

         data(bryceveg) # returns a data frame of vegetation data
         data(brycesite)
         ## Not run: library(tree)
         ## Not run: 
     mod <- tree(factor(bryceveg$arcpat>0)~
                  elev+slope+av,data=brycesite)
     ## End(Not run)
         ## Not run: pred <- predict(mod,newdata=brycesite)
         ## Not run: confus(bryceveg$arcpat>0,pred)

