# ============================================================ # Task: traffic_flow_forecasting # ============================================================ # Task objective: # - Use a historical window of LargeST traffic_flow to predict a future window. # - This is a typical multisensor time series forecasting task. # # Core semantics: # - sample defines one sample: a decision timestamp. # - inputs defines what the model can access: historical traffic_flow before timestamp, # plus future covariates known at prediction time, such as day_of_week. # - prediction defines what to predict: the traffic_flow sequence over the future horizon. # - leakage defines which future values must be excluded from inputs: future traffic_flow must never be an input. # ============================================================ task: id: traffic_flow_forecasting # Unique task ID; keep it consistent with the directory name for automatic discovery by scripts. type: time_series_forecasting # Task type: time series forecasting. description: > Predict future LargeST traffic_flow from historical traffic_flow. Each sample corresponds to one decision timestamp, and labels are stored by index reference to avoid expanding all sensor-by-time targets into labels.csv. # Whether to inherit the general processing rules in ../general_task.yaml. inherit_general: true sample: primary_key: timestamp # Label storage mode. # index_reference: labels.csv does not expand every (ID, timestamp, horizon) label; # instead, reference columns point to the underlying time series file. # long_table: labels.csv stores each target value in a separate row; this is larger but easier to inspect. label_mode: index_reference inputs: # ------------------------------------------------------------ # Model input 1: historical traffic flow. # ------------------------------------------------------------ time_series: - fields: traffic_flow # Historical time series fields available to the model. source: traffic_flow_ca_2019 # Refers to the underlying LargeST h5 file defined in data_refs.time_series. window: length: 64 # The history window contains 672 task time steps. unit: 15min # Each step is 15 minutes, so the model sees the past 7 days. sampling: # Optional configuration; set this here if the raw data is not sampled every 15min. native_rate: 15min # Native sampling resolution of the LargeST h5 file. task_rate: 15min # Input resolution for this task, matching the native resolution. downsample_method: mean # If changed to 1h, use mean to aggregate four 15min observations. upsample_method: ffill # If changed to a finer resolution, use forward filling. tabular_static: source: largeST_static_metadata # Refers to the static attribute table in data_refs.tabular_static. fields: - Lat - Lng - District - County - Fwy - Lanes - Type - Direction graph: source: road_distance_graph prediction: field: traffic_flow # Target variable to predict. source: traffic_flow_ca_2019 # Target values come from the same LargeST historical traffic flow h5 file. horizon: length: 16 # Predict the next 16 time steps. unit: 15min # Each step is 15 minutes, so the forecast covers the next 4 hours. starts_after: timestamp # The future window starts after sample.timestamp. stride: 16 # Timestamps of adjacent samples are 16 task time steps apart. label_storage: ref_column: target_series_ref # Reference column in labels.csv pointing to the underlying target sequence. shape_column: target_tensor_shape # Column in labels.csv recording the target tensor shape, for example [num_nodes, horizon, num_fields]. leakage: observed_past_only_columns: - traffic_flow # traffic_flow can only be a historical input; future traffic_flow is the prediction target and must not be an input. data_refs: time_series: - traffic_flow_ca_2019: file: All_Datasets/LargeST_ca_full/input_multimodal/time_series/traffic_flow/ca_his_2019.h5 # LargeST California 2019 historical traffic flow file. value_field: traffic_flow # Semantics of the corresponding variable in the h5 file. native_grid_minutes: 15 # The native time grid is 15 minutes. tabular_static: largeST_static_metadata: file: All_Datasets/LargeST_ca_full/input_multimodal/ca_meta.csv # Static sensor attribute table. id_column: ID graph: road_distance_graph: file: All_Datasets/LargeST_ca_full/input_multimodal/node_level_task_graphs/road_distance_graph/edge_infos.csv