causalcompass.datasets.nonstationary.simulate_nonstationary_var
- causalcompass.datasets.nonstationary.simulate_nonstationary_var(p, T, lag=3, sparsity=0.2, sd=0.1, beta_value=1.0, noise_std=1.0, mean_log_sigma=1.0, burn_in=100, seed=0)[source]
Generate VAR data with time-varying noise variance (driven by Gaussian Process).
- Parameters:
p (int) – Number of variables
T (int) – Number of time points
lag (int, default 3) – Number of lags in the VAR model
sparsity (float, default 0.2) – Sparsity of the causal graph
sd (float, default 0.1) – Noise standard deviation
beta_value (float, default 1.0) – Coefficient value
noise_std (float, default 1.0) – Standard deviation of the GP
mean_log_sigma (float, default 1.0) – Mean of the GP
burn_in (int, default 100) – Burn-in period
seed (int, default 0) – Random seed
- Returns:
(data, beta, sigma_t, GC) — time series array of shape (T, p), VAR coefficient matrix, time-varying noise scaling factor of shape (T, p), and ground-truth causal graph of shape (p, p).
- Return type:
tuple