sign.flip              package:supclust              R Documentation

_S_i_g_n-_f_l_i_p_p_i_n_g _o_f _P_r_e_d_i_c_t_o_r _V_a_r_i_a_b_l_e_s _t_o _O_b_t_a_i_n _E_q_u_a_l _P_o_l_a_r_i_t_y

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

     Computes the 'score' for each predictor variable (gene) in the
     'x'-Matrix, and multiplies its values with (-1) if its 'score' is
     greater or equal than half of the maximal 'score'. For gene
     expression data, this amounts to treating under- and
     overexpression symmetrically. After the sign-flip procedure, low
     (expression) values point towards response class 0 and high
     (expression) values point towards class 1.

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

     sign.flip(x, y)

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

       x: Numeric matrix of explanatory variables (p variables in
          columns, n cases in rows). For example, these can be
          microarray gene expression data which should be sign-flipped
          and then clustered.

       y: Numeric vector of length n containing the class labels of the
          individuals. These labels have to be coded by 0 and 1.

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

     Returns a list containing: 

flipped.matrix: The sign-flipped 'x'-matrix.

   signs: Numeric vector of length p, which for each predictor variable
          indicates whether it was sign-flipped (coded by -1) or not
          (coded by +1).

_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' and 'score', as well as for a newer methodology, 'pelora'
     and 'sign.change'.

_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)# reset

