dirconn.ADTF#

class dirconn.ADTF(order: int | str = 'bic', max_order: int = 5, update: str = 'dual', 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)#

Adaptive directed transfer function: the DTF at every time point.

values[i, j, f, t] is the share of the signal reaching channel j at frequency f and time t that comes from channel i, computed from the time-varying MVAR. Like the DTF it mixes direct and indirect paths and is predictive, not interventional. The recursion estimates the coefficients at every sample, so the time resolution is set by the forgetting factor through the measured memory of the recursion, not by a window; a switch is followed with a lag of that order, and values just after a switch still carry the previous state.

The default recursion is update="dual". See dirconn.methods.timevarying.tvmvar.TvarFit for what is recorded, and the parameters of this class’s base for the settings.

__init__(order: int | str = 'bic', max_order: int = 5, update: str = 'dual', 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) → 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

standardize

state_cov_init

time_step

update