def module_degree_zscore(cmatrix, Ci): """ Computes 'within module degree z-score' Computes z-score for a binary graph and its corresponding community structure. For a directed graph, computes out-neighbor z-score. Degree based measures for classifying nodes in the context of community structure. The z-score describes how well the nodes are connected to other nodes within their modules. Note that, for directed networks, these functions compute the measures based on the out-degree. function Z=module_degree_zscore(A,Ci) Parameters --------- cmatrix : binary adjacency matrix Ci : community structure vector Returns ------- Z : z-score Output for directed graphs: "out-neighbor" z-score. Reference: Guimera R, Amaral L. Nature (2005) 433:895-900. Mika Rubinov, UNSW, 2008 """ m = bct.to_gslm(cmatrix.tolist()) cil = bct.to_gslv(Ci.tolist()) str = bct.module_degree_zscore(m, cil) strnp = bct.from_gsl(str) bct.gsl_free(m) bct.gsl_free(str) return np.asarray(strnp)
def module_degree_zscore(*args): return _bct.module_degree_zscore(*args)
def module_degree_zscore(*args): """module_degree_zscore(gsl_matrix A, gsl_vector Ci) -> gsl_vector""" return _bct.module_degree_zscore(*args)