File size: 1,570 Bytes
85868e0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# M5 Demand Forecasting Artifacts

## What the models predict
The models predict weekly demand (sales) for 28-day horizons (d_1942 through d_1969) for 30,490 M5 series.

## Exact input contract
- Features must be computed as-of origin day d_1913 using only data with day index <= D
- Categorical features must be encoded using categorical_maps.json with .map()
- Feature order must match feature_schema.json feature_names element by element
- All float columns must be float32; no float64 or object columns permitted
- Target encoding (dept_id, store_id, item_id) is computed only on data before the origin (leakage-safe)

## Files required together
Boosters alone are insufficient. Required files:
- artifacts/feature_schema.json
- artifacts/categorical_maps.json
- artifacts/training_config.json
- data/processed/m5_melted.parquet

## Known limitation
Predictions valid only for recorded forecast origin unless history is supplied

## Recorded local WRMSSE per fold
- Fold A: 148.327863
- Fold B: 121.276794
- Fold C: 167.073294
- Mean: 145.559317

## Copy-pasteable load instructions
```python
import lightgbm as lgb
import pandas as pd

models = {}
for f in os.listdir('artifacts/models/'):
    model = lgb.Booster(model_file='artifacts/models/' + f)
    models[f] = model

with open('artifacts/training_config.json') as f:
    config = json.load(f)
with open('artifacts/feature_schema.json') as f:
    schema = json.load(f)
with open('artifacts/categorical_maps.json') as f:
    cat_maps = json.load(f)

df = pd.read_parquet('data/processed/m5_melted.parquet')
```