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 channeljat frequencyfand timetthat comes from channeli, 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". Seedirconn.methods.timevarying.tvmvar.TvarFitfor 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_tvaroptions other thanforgetting.Attributes
burn_indemeanfmaxforgettingfreqsinfoinitinit_samplesmax_ordermeasurement_noisen_foldsn_freqsobs_noiseorderprocess_noiseridgestandardizestate_cov_inittime_stepupdate