dirconn.viz.group_matrix#

dirconn.viz.group_matrix(conn: Connectivity, groups: Mapping[str, str], *, how: str = 'mean', freq: float | None = None, band: str | Sequence[float] | None = None, time: float | None = None) → DataFrame#

Summarise a result between groups of nodes.

Entry [g, h] is the mean (or sum) of values[i, j] over the nodes i of group g and j of group h, i != j, ignoring undefined cells; it is NaN when there is no such pair (a group of one node has no value within itself). Rows are sources and columns are targets. The groups appear in the order of their first node. freq, band and time choose the slice as in Connectivity.plot().