Ejemplo n.º 1
0
def matching_ind(cmatrix):
    """ Matching index. For any two nodes u and v, the matching index computes
    the amount of overlap in the connection patterns of u and v.
    Self-connections and cross-connections between u and v are ignored.
    For undirected networks, all outputs of this function are identical.
    The matching index is a symmetric quantity, similar to a correlation
    or a dot product, the function returns only the upper triangle of the
    matching matrix.
    
    Parameters
    ----------

    cmatrix : connection/adjacency matrix

    Returns
    -------
    
    Mall : matching index for all connections    

    Does not use self- or cross connections for comparison.
    Does not use connections that are not present in BOTH i and j.
    All output matrices are calculated for upper triangular only (symmetrical).

    Reference: Hilgetag et al. (2002).

    Olaf Sporns, Indiana University, 2002/2007/2008
    
    """
    m = bct.to_gslm(cmatrix.tolist())
    mi = bct.matching_ind(m)
    minp = bct.from_gsl(mi)
    bct.gsl_free(m)
    bct.gsl_free(mi)
    return np.asarray(minp)
Ejemplo n.º 2
0
def matching_ind(cmatrix):
    """ Matching index. For any two nodes u and v, the matching index computes
    the amount of overlap in the connection patterns of u and v.
    Self-connections and cross-connections between u and v are ignored.
    For undirected networks, all outputs of this function are identical.
    The matching index is a symmetric quantity, similar to a correlation
    or a dot product, the function returns only the upper triangle of the
    matching matrix.
    
    Parameters
    ----------

    cmatrix : connection/adjacency matrix

    Returns
    -------
    
    Mall : matching index for all connections    

    Does not use self- or cross connections for comparison.
    Does not use connections that are not present in BOTH i and j.
    All output matrices are calculated for upper triangular only (symmetrical).

    Reference: Hilgetag et al. (2002).

    Olaf Sporns, Indiana University, 2002/2007/2008
    
    """
    m = bct.to_gslm(cmatrix.tolist())
    mi = bct.matching_ind(m)
    minp = bct.from_gsl(mi)
    bct.gsl_free(m)
    bct.gsl_free(mi)
    return np.asarray(minp)
Ejemplo n.º 3
0
def matching_ind(*args):
  return _bct.matching_ind(*args)
Ejemplo n.º 4
0
def matching_ind(*args):
    return _bct.matching_ind(*args)
Ejemplo n.º 5
0
def matching_ind(*args):
  """matching_ind(gsl_matrix CIJ) -> gsl_matrix"""
  return _bct.matching_ind(*args)
Ejemplo n.º 6
0
def matching_ind(*args):
    """matching_ind(gsl_matrix CIJ) -> gsl_matrix"""
    return _bct.matching_ind(*args)