dirconn.coupled_nonlinear#
- dirconn.coupled_nonlinear(n_times: int, *, sfreq: float, seed: int, coupling: str = 'quadratic', strength: float = 0.5, delay: int = 2, n_trials: int = 1) tuple[TimeSeries, Connectivity]#
Three channels where X drives Y through a chosen function and Z is independent.
X_t = 0.6 X_{t-1} + e,Y_t = 0.4 Y_{t-1} + strength * g(X_{t-delay}) + e,Z_t = 0.5 Z_{t-1} + e, with independent unit-variance Gaussian noisee. The couplingghas zero mean and unit variance:"quadratic"is(x^2 - s^2) / (sqrt(2) s^2)withs^2the stationary variance of X, whose linear correlation withxis zero, so a linear method sees no influence;"linear"isx / s. This is a small test bed for methods that claim to see non-linear dependence, not a model of brain signals; it is not part of the scenario library or the head-model pipeline.- Parameters:
n_times (int) – Samples per trial (after a burn-in of 100 samples).
sfreq (float) – Sampling frequency in Hz (the model is in samples;
sfreqonly labels the time axis).seed (int) – Seed of the random numbers; required.
coupling ({"quadratic", "linear"})
strength (float) – Weight of
gin Y.delay (int) – Lag of the coupling in samples (at least 1).
n_trials (int) – Independent trials; one trial gives continuous data, more give epoched data.
- Returns:
data (TimeSeries) – Channels
X,Y,Z.truth (Connectivity) –
1for X -> Y,0for the other pairs, NaN on the diagonal.