dirconn.MTGC#

class dirconn.MTGC(segment_length: float | None = None, time_halfbandwidth: float = 4.0, fmin: float = 0.0, fmax: float | None = None)#

Pairwise spectral Granger causality from multitaper spectra, without a fitted model.

values[i, j, f] is Geweke’s spectral Granger causality from i to j at frequency f (in nats), computed from the Wilson factorisation of the two-sided multitaper spectral matrix of the pair (i, j) alone (Dhamala et al. 2008). Each pair is judged on its own, so an indirect or shared influence through a third channel is not removed (as in GC(conditional=False)); the conditional version is not implemented. The mean over the whole unit circle approximates the time-domain pairwise Granger causality; it is recorded in the provenance (integral). The diagonal is undefined (NaN). This is predictive influence, not interventional causality.

Parameters:
  • segment_length (float, optional) – Segment length in seconds; required for continuous data, optional for epoched data. It sets the frequency resolution, 1 / segment_length Hz, and so has no default.

  • time_halfbandwidth (float) – Time-half-bandwidth product NW of the tapers (at least 1).

  • fmin (float) – Frequency range of the result in Hz, inclusive (the factorisation always uses the whole spectrum). The frequencies are the native bins of the segment length, 0 Hz included.

  • fmax (float) – Frequency range of the result in Hz, inclusive (the factorisation always uses the whole spectrum). The frequencies are the native bins of the segment length, 0 Hz included.

__init__(segment_length: float | None = None, time_halfbandwidth: float = 4.0, fmin: float = 0.0, fmax: float | None = None) → None#

Methods

__init__([segment_length, ...])

fit(data)

Estimate directed connectivity.

get_params()

Return the constructor parameters as a dictionary.

Attributes

fmax

fmin

info

segment_length

time_halfbandwidth