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 channeliat frequencyfand timetthat goes to channelj, built from the time-varying coefficients and therefore reflecting direct influences only. The default recursion isupdate="dekf", which suits recordings with observation noise (as in the literature on temporal PDC). The amplitude form of the old package issquared=False; the default here is the squared form, as inPDC.- 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_tvaroptions other thanforgetting.Attributes
burn_indemeanfmaxforgettingfreqsinfoinitinit_samplesmax_ordermeasurement_noisen_foldsn_freqsobs_noiseorderprocess_noiseridgesquaredstandardizestate_cov_inittime_stepupdate