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

