

confusion(mda)                               R Documentation

_c_o_m_p_u_t_e _t_h_e _c_o_n_f_u_s_i_o_n _m_a_t_r_i_x _b_e_t_w_e_e_n _t_w_o _f_a_c_t_o_r_s_, _o_r _f_o_r _a_n
_f_d_a _o_r _m_d_a _o_b_j_e_c_t

_U_s_a_g_e_:

     confusion(predict, true)

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

 predict: the predicted factor, or an fda or mda model

    true: the true factor, or else (in the case where pre-
          dict is a model object) a data frame (list) con-
          taining the test data.

_V_a_l_u_e_:

     essential table(predict, true), but with some useful
     attribute(s)

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

     `fda', `predict.fda'

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

     data(iris)
     irisfit <- fda(Species ~ ., data = iris)
     confusion(predict(irisfit, iris), iris$Species)
     ##            Setosa Versicolor Virginica
     ##     Setosa     50          0         0
     ## Versicolor      0         48         1
     ##  Virginica      0          2        49
     ## attr(, "error"):
     ## [1] 0.02

