JaccardCoef              package:ScISI              R Documentation

_A _f_u_n_c_t_i_o_n _t_o _c_a_l_c_u_l_a_t_e _t_h_e _J_a_c_c_a_r_d _s_i_m_i_l_a_r_i_t_y _i_n_d_e_x _b_e_t_w_e_e_n _t_w_o _s_e_t_s

_D_e_s_c_r_i_p_t_i_o_n:

     The JaccardCoef function takes the return values of
     'compareComplex' function and calculates, for each pair of
     complexes C-i and K-j (where C-i is in first bipartite graph
     matrix and K-j is second), the similarity coefficient of Jaccard.

_U_s_a_g_e:

     JaccardCoef(dataMat)

_A_r_g_u_m_e_n_t_s:

 dataMat: A list which is the output from 'compareComplex', which is a
          list of three matrices: intersect, cminusk, and kminusc which
          are explained in the details.

_D_e_t_a_i_l_s:

     The argument of this function is a list of three matrices all of
     whom are indexed exactly in the same manner - the rows of each of
     the matrix is indexed by the complexes, {C-i}, of the first
     bipartite graph, bg1, and the colunms are indexed by the
     complexes, {K-j} of the second bipartite graph, bg2.

     The first matrix of the list is the intersect matrix, I. The (i,j)
     entry of I is the cardinality of complex C-i of bg1 and K-j of
     bg2.

     The second matrix of the list is the cminusk matrix, Q. The (i,j)
     entry of Q is the cardinality of the set difference between C-i
     and K-j.

     The third matrix of the list is the kminusc matrix, P. The (i,j)
     entry of P is the cardinality of the set difference between K-j
     and C-i.

     The Jaccard Coefficient between two sets (here between two
     complexes) C-i and K-j is given by the quotient of cardinality(C-i
     intersect K-j) and cardinality(C-i union K-j). Note that
     cardinality(C-i intersect K-j) is the (i,j) entry of I, and that
     cardinality(C-i union K-j) is the sum of the (i,j) entry of I, Q,
     P.

_V_a_l_u_e:

     The return value is a matrix consisting of the Jaccaard
     coefficient for each pair of complexes C-i and K-j with rows in
     indexed by C-i and columns indexed by K-j.

_A_u_t_h_o_r(_s):

     Tony Chiang

_E_x_a_m_p_l_e_s:

     #go = getGOInfo(wantAllComplexes=FALSE)
     #mips = getMipsInfo(wantSubComplexes=FALSE)
     #goM = createGOMatrix(go)
     #mipsM = createMipsMatrix(mips)
     #cc = runCompareComplex(mipsM, goM, byWhich = "ROW")
     #cc$simInd

