Skip to content

Synthetic Test Data

Patricia Wollstadt edited this page Jul 18, 2018 · 2 revisions

IDTxl's Data() class provides methods to generate synthetic test data for network inference. Methods simulate networks of coupled autoregressive processes (linear dynamics) or of coupled logistic maps (non-linear dynamics).

Import Data Class

from idtxl.data import Data
import numpy as np

Simulate MuTE network

Generate data for five coupled autoregressive processes according to the paper by Montalto et al.. The network consists of five autoregressive processes with model orders 2 and the following (non-linear) couplings:

0 -> 1, u = 2 (non-linear)
0 -> 2, u = 3
0 -> 3, u = 2 (non-linear)
3 -> 4, u = 1
4 -> 3, u = 1
data = Data()  # initialise an empty data object
data.generate_mute_data(n_samples=1000, n_replications=10)

Reference:

  • Montalto, A., Faes, L., & Marinazzo, D. (2014). MuTE: A MATLAB Toolbox to Compare Established and Novel Estimators of the Multivariate Transfer Entropy. PLoS ONE 9(10): e109462. https://doi.org/10.1371/journal.pone.0109462

Simulate coupled autoregressive processes

Generate data for network of coupled discrete-time VAR (vector autoregressive) processes. The VAR-order and the number of processes is defined by the dimension of the coefficient_matrices argument: the array has dimensions [VAR order, number of processes, number of processes] with default np.array([[[0.5, 0], [0.4, 0.5]]]).

The method throws an error if the provided coefficients result in non-stable AR-processes. By default, the method adds Gaussian noise to the data.

data = Data()  # initialise an empty data object
data.generate_var_data(
        n_samples=1000,
        n_replications=10,
        coefficient_matrices=np.array([[[0.5, 0], [0.4, 0.5]]]),
        noise_std=0.1)

Simulate coupled Logistic maps

Generate data for network of coupled logistic maps. The order and the number of processes is defined by the dimension of the coefficient_matrices argument: the array has dimensions [order, number of processes, number of processes] with default np.array([[[0.5, 0], [0.4, 0.5]]]).

The implemented logistic map function is f(x) = 4 * x * (1 - x).

data = Data()  # initialise an empty data object
data.generate_logistic_maps_data(
        n_samples=1000,
        n_replications=10,
        coefficient_matrices=np.array([[[0.5, 0], [0.4, 0.5]]]),
        noise_std=0.1)
Clone this wiki locally