Step 2 — Build the partial graph¶
A bookkeeping step. Given the lagged structure from Step 1:
- Add an undirected contemporaneous edge between every pair
(i, j)of variables. This is the fully-connected starting skeleton; Step 3 will thin it. - Tentatively mark every variable as a changing module. Step 3 will prune via CI tests against the surrogate.
No statistical tests are run here. Lagged edges are untouched.
Why this is its own step¶
Two reasons:
- Separation of concerns. Steps 1 and 3 are statistical tests; Step 2 is pure data-structure manipulation. Keeping it separate makes the boundary between "what we observed" and "what we initialize" explicit.
- Easier to swap in different starting structures. A user with prior
knowledge can replace
build_partial_graphwith their own initializer (e.g., one that excludes physically impossible contemporaneous edges) without touching Step 3 or Step 4.
API¶
build_partial_graph ¶
Add the fully-connected contemporaneous skeleton to graph.
Modifies graph in place and returns it. The lagged edges already
present are preserved untouched.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
graph
|
TimeSeriesGraph
|
The output of Step 1 (lagged adjacency identification). |
required |
Returns:
| Type | Description |
|---|---|
TimeSeriesGraph
|
The same graph with all contemporaneous pairs |