NPN / README.md
rishini's picture
Export: 40 per-store boosters, WRMSSE=145.56
85868e0 verified
|
Raw
History Blame Contribute Delete
1.57 kB

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

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')