margin               package:supclust               R Documentation

_C_l_a_s_s_i_f_i_c_a_t_i_o_n _M_a_r_g_i_n _B_e_t_w_e_e_n _T_w_o _S_a_m_p_l_e _C_l_a_s_s_e_s

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

     For a set of n observations grouped into two classes (for example
     n expression values of a gene), the 'margin' function measures the
     size of the gap between the classes. This is the distance between
     the observation of response class zero having the lowest value,
     and the individual of with response one having the highest value.

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

     margin(x, resp)

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

       x: Numeric vector of length n, for example containing gene or
          cluster expression values of n different cases.

    resp: Numeric vector of length n containing the ``binary'' class
          labels of the cases.  Must be coded by '0' and '1'.

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

     A numeric value, the 'margin'. Positive 'margin' indicates perfect
     separation of the response classes, whereas negative 'margin'
     means imperfect separation.

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

     Marcel Dettling, dettling@stat.math.ethz.ch

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

     Marcel Dettling (2002) _Supervised Clustering of Genes_, see <URL:
     http://stat.ethz.ch/~dettling/supercluster.html>

     Marcel Dettling and Peter Bhlmann (2002). Supervised Clustering
     of Genes. _Genome Biology_, *3*(12): research0069.1-0069.15.

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

     'wilma', 'score' is the second statistic that is used there.

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

     data(leukemia, package="supclust")
     op <- par(mfrow=c(1,3))
     plot(leukemia.x[,69],leukemia.y)
     title(paste("Margin = ", round(margin(leukemia.x[,69], leukemia.y),2)))

     ## Sign-flipping is very important
     plot(leukemia.x[,161],leukemia.y)
     title(paste("Margin = ", round(margin(leukemia.x[,161], leukemia.y),2)))
     x <- sign.flip(leukemia.x, leukemia.y)$flipped.matrix
     plot(x[,161],leukemia.y)
     title(paste("Margin = ", round(margin(x[,161], leukemia.y),2)))
     par(op)

