4.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: Optional[int] = None)[source]#

Simulate a VAR(max_lag) process starting from a summary graph.

Parameters:

G : nx.MixedEdgeGraph

A time-series summary graph.

max_lag : int, optional

The maximum time-lag to consider, by default 1, which corresponds to a VAR(1) process.

n_times : int

Number of observations (time points) to simulate, this includes the initial observations to start the autoregressive process. By default 1000.

random_state : int, optional

The random seed, by default None.

Returns:

x_df : pandas DataFrame of shape (n_nodes, n_times)

The sampled dataset.

var_arr : ArrayLike 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.