bayesclass              package:mlbench              R Documentation

_B_a_y_e_s _c_l_a_s_s_i_f_i_e_r

_D_e_s_c_r_i_p_t_i_o_n:

     Returns the decision of the (optimal) Bayes classifier for a given
     data set. This is a generic function, i.e., there are different
     methods for the various mlbench problems.

     If the classes of the problem do not overlap, then the Bayes
     decision is identical to the true classification, which is
     implemented as the dummy function 'bayesclass.noerr' (which simply
     returns 'z$classes' and is used for all problems with disjunct
     classes).

_U_s_a_g_e:

     bayesclass(z)

_A_r_g_u_m_e_n_t_s:

       z: An object of class '"mlbench"'.

_E_x_a_m_p_l_e_s:

     # 6 overlapping classes
     p <- mlbench.2dnormals(500,6)
     plot(p)

     plot(p$x, col=as.numeric(bayesclass(p)))

