File size: 3,485 Bytes
0a665df
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# ============================================================
# Task: sales_flow_forecasting
# ============================================================
# Task objective:
# - Use historical sales of Store Sales store-category nodes to predict future sales.
# - This is a timestamp-level time series forecasting task across multiple store-family nodes.
#
# Core semantics:
# - sample is a decision timestamp.
# - inputs are the historical time series available before that timestamp, plus future covariates known at prediction time, such as onpromotion and is_holiday.
# - prediction is each episode's sales sequence over the future horizon.
# - Future sales (protocol time series ID: sales) must be excluded from inputs to prevent label leakage.
# ============================================================

task:
  id: sales_flow_forecasting
  type: time_series_forecasting
  description: >
    Predict future Store Sales flow from historical sales sequences for all
    (store_nbr, family) episodes. Each sample corresponds to one decision
    timestamp and uses index-reference labels.

inherit_general: true

sample:
  primary_key: timestamp
  label_mode: index_reference

inputs:
  time_series:
    - fields: sales
      source: sales_flow_store_sales
      window:
        length: 28
        unit: day
      sampling:
        native_rate: 1day
        task_rate: 1day
        downsample_method: mean
        upsample_method: ffill
    - fields: onpromotion
      source: store_family_known_future_onpromotion
      window:
        length: 28
        unit: day
      sampling:
        native_rate: 1day
        task_rate: 1day
        downsample_method: mean
        upsample_method: ffill
    - fields: is_holiday
      source: store_family_known_future_holiday
      window:
        length: 28
        unit: day
      sampling:
        native_rate: 1day
        task_rate: 1day
        downsample_method: mean
        upsample_method: ffill

  tabular_static:
    source: store_sales_static_metadata
    fields:
      - store_nbr
      - family
      - family_id
      - city
      - state
      - type
      - cluster

  graph:
    source: store_family_relation_graph

prediction:
  field: sales
  source: sales_flow_store_sales
  horizon:
    length: 7
    unit: day
    starts_after: timestamp
  stride: 7
  label_storage:
    ref_column: target_series_ref
    shape_column: target_tensor_shape

leakage:
  observed_past_only_columns:
    - sales
  known_future_columns:
    - onpromotion
    - is_holiday

data_refs:
  time_series:
    sales_flow_store_sales:
      file: Store_Sales_protocol/input_multimodal/time_series/sales/sales.h5
      value_field: sales
      native_grid_minutes: 1440
    store_family_known_future_onpromotion:
      file: Store_Sales_protocol/input_multimodal/time_series/onpromotion/onpromotion.h5
      value_field: onpromotion
      native_grid_minutes: 1440
    store_family_known_future_holiday:
      file: Store_Sales_protocol/input_multimodal/time_series/is_holiday/is_holiday.h5
      value_field: is_holiday

  tabular_static:
    store_sales_static_metadata:
      file: Store_Sales_protocol/input_multimodal/meta_features.csv
      id_column: episode_id

  graph:
    store_family_relation_graph:
      file: Store_Sales_protocol/input_multimodal/node_level_task_graphs/store_family_relation_graph/edge_infos.csv