conpy.VertexConnectivity

class conpy.VertexConnectivity(data, pairs, vertices, vertex_degree=None, subject=None, directed=False)

Estimation of connectivity between vertices.

Parameters
datandarray, shape (n_pairs,)

For each connectivity source pair, a value describing the connection. For example, this can be the strength of the connection between the sources.

pairsndarray, shape (n_pairs, 2)

The vertices involved in the from-to connectivity pair. The vertices are listed as “vertex indices” in the array:

np.hstack((vertices[0], (vertices[1] + len(vertices[0]))))

verticeslist of two arrays of shape (n_vertices,)

For each hemisphere, the vertex numbers of sources defined in the corresponding source space.

vertex_degreetuple of lists (out_degree, in_degree) | None

For each vertex, the total number of possible connections from and to the vertex. This information is needed to perform weighting on the number of connections during visualization and statistics. If None, it is assumed that all possible connections are defined in the pairs parameter and the out- and in-degree of each vertex is computed.

subjectstr | None

The subject-id.

directedbool

Whether the connectivity is directed (from->to != to->from). Defaults to False.

Attributes
n_connectionsint

The number of connections.

n_sourcesint

The number of sources between possible connections were computed.

__getitem__(index)

Select connections without making a deep copy.

__hash__(/)

Return hash(self).