コード例 #1
0
ファイル: measures.py プロジェクト: omerch/pyconto
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)
コード例 #2
0
ファイル: measures.py プロジェクト: aestrivex/pyconto
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)
コード例 #3
0
ファイル: bct.py プロジェクト: aestrivex/pyconto
def matching_ind(*args):
  return _bct.matching_ind(*args)
コード例 #4
0
def matching_ind(*args):
    return _bct.matching_ind(*args)
コード例 #5
0
ファイル: bct.py プロジェクト: aestrivex/pyconto
def matching_ind(*args):
  """matching_ind(gsl_matrix CIJ) -> gsl_matrix"""
  return _bct.matching_ind(*args)
コード例 #6
0
ファイル: bct.py プロジェクト: omerch/pyconto
def matching_ind(*args):
    """matching_ind(gsl_matrix CIJ) -> gsl_matrix"""
    return _bct.matching_ind(*args)