andrey.data.sample_context_series#
- andrey.data.sample_context_series(n_system=5, n_time=2, n_space=1, *, n_datasets=10, n_steps=100, tau_max=2, n_links=None, observed=1.0, seed=0)[source]#
Draw linear time series from
n_datasetsdatasets with shared contexts.Each system variable has a link to its own past with weight in
[0.3, 0.8].n_linksfurther links,n_systemby default, and one link from each context, into distinct system variables, have weights in[0.5, 0.9]; half are at lag0and the rest uniform in1totau_max, and a space context’s is at lag0. The noise is standard normal. Each system variable is rescaled to variance one across the datasets, so its variance does not tell the causal order.observedis the fraction of the contexts the datasets hold, the rest chosen at random.Raises
ValueErrorwhen there are more contexts than system variables or more links than pairs of them, or when no draw of the weights is stationary.- Return type: