5.1.3. pywhy_graphs.simulate.simulate_var_process_from_summary_graph#
- pywhy_graphs.simulate.simulate_var_process_from_summary_graph(G: MixedEdgeGraph, max_lag=1, n_times=1000, random_state: int | None = None)[source]#
Simulate a VAR(max_lag) process starting from a summary graph.
- Parameters:
- Gnx.MixedEdgeGraph
A time-series summary graph.
- max_lagint, optional
The maximum time-lag to consider, by default 1, which corresponds to a VAR(1) process.
- n_timesint
Number of observations (time points) to simulate, this includes the initial observations to start the autoregressive process. By default 1000.
- random_stateint, optional
The random seed, by default None.
- Returns:
- x_dfpandas DataFrame of shape (n_nodes, n_times)
The sampled dataset.
- var_arrArrayLike of shape (n_nodes, n_nodes, max_lag)
The stationary time-series graph.
Notes
Right now, it is assumed that the summary graph is just a DAG.