dirconn.TPDC#

class dirconn.TPDC(order: int | str = 'bic', max_order: int = 5, update: str = 'dekf', forgetting: float = 0.99999, process_noise: float | None = None, obs_noise: float | None = None, measurement_noise: float | None = None, init: str = 'var', init_samples: int | None = None, state_cov_init: float = 1.0, burn_in: int | None = None, time_step: float | None = None, n_freqs: int = 64, fmax: float | None = None, freqs: Any = None, ridge: float = 0.0, n_folds: int = 5, standardize: bool = True, demean: bool = True, squared: bool = True)#

Time-varying partial directed coherence: the PDC at every time point.

values[i, j, f, t] is the share of the outflow of channel i at frequency f and time t that goes to channel j, built from the time-varying coefficients and therefore reflecting direct influences only. The default recursion is update="dekf", which suits recordings with observation noise (as in the literature on temporal PDC). The amplitude form of the old package is squared=False; the default here is the squared form, as in PDC.

Parameters:
  • squared (bool) – True (default): the squared form, whose values sum to 1 over the targets. False: the amplitude form, its square root.

  • class. (The other parameters are those of the base)

__init__(order: int | str = 'bic', max_order: int = 5, update: str = 'dekf', forgetting: float = 0.99999, process_noise: float | None = None, obs_noise: float | None = None, measurement_noise: float | None = None, init: str = 'var', init_samples: int | None = None, state_cov_init: float = 1.0, burn_in: int | None = None, time_step: float | None = None, n_freqs: int = 64, fmax: float | None = None, freqs: Any = None, ridge: float = 0.0, n_folds: int = 5, standardize: bool = True, demean: bool = True, squared: bool = True) → None#

Methods

__init__([order, max_order, update, ...])

fit(data)

Estimate directed connectivity.

from_fit(data, fit)

Return the result for a fit that was computed beforehand.

get_params()

Return the constructor parameters as a dictionary.

tvar_options(data)

Return the fit_tvar options other than forgetting.

Attributes

burn_in

demean

fmax

forgetting

freqs

info

init

init_samples

max_order

measurement_noise

n_folds

n_freqs

obs_noise

order

process_noise

ridge

squared

standardize

state_cov_init

time_step

update