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)))

