rishini commited on
Commit
007b61a
·
verified ·
1 Parent(s): 2d09196

Upload prophet model with evaluation metrics

Browse files
Files changed (5) hide show
  1. README.md +40 -0
  2. metrics.json +8 -0
  3. model.pkl +3 -0
  4. model_config.json +26 -0
  5. predictions.csv +29 -0
README.md ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Prophet Model for M5 Demand Forecasting
2
+
3
+ ## Overview
4
+ Prophet (Facebook's forecasting library) trained on aggregated daily M5 sales data.
5
+
6
+ ## Model Details
7
+ - **Architecture**: Additive model with trend, weekly/yearly seasonality, and event effects
8
+ - **Training Data**: 1,913 days of aggregated daily sales (2011-01-29 to 2016-04-24)
9
+ - **Test Period**: 28 days (2016-04-25 to 2016-05-22)
10
+
11
+ ## Performance
12
+ | Metric | Value |
13
+ |--------|-------|
14
+ | RMSE | 4,860.67 |
15
+ | MAE | 4,038.73 |
16
+ | MAPE | 8.73% |
17
+
18
+ ## Key Features
19
+ - Piecewise linear growth trend
20
+ - Weekly seasonality (captures day-of-week patterns)
21
+ - Yearly seasonality (captures seasonal trends)
22
+ - 154 holiday/event effects
23
+ - 95% prediction intervals
24
+
25
+ ## Usage
26
+ ```python
27
+ import pickle
28
+ import pandas as pd
29
+
30
+ with open('model.pkl', 'rb') as f:
31
+ model = pickle.load(f)
32
+
33
+ future = model.make_future_dataframe(periods=28, freq='D')
34
+ forecast = model.predict(future)
35
+ ```
36
+
37
+ ## Notes
38
+ - Prophet naturally handles missing values and structural breaks
39
+ - The model captures strong weekly patterns (weekend vs weekday sales)
40
+ - Lower performance than SARIMAX but faster to train
metrics.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "rmse": 4860.667344419225,
3
+ "mae": 4038.7328999714914,
4
+ "mape": 8.72544270105418,
5
+ "method": "Prophet",
6
+ "train_days": 1913,
7
+ "test_days": 28
8
+ }
model.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:df52719ab0b801c14080bd001f041825bd7271fc867fbacae93442f396909b7a
3
+ size 183616
model_config.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_name": "Prophet",
3
+ "hyperparameters": {
4
+ "changepoint_prior_scale": 0.001,
5
+ "seasonality_prior_scale": 10.0,
6
+ "holidays_prior_scale": 10.0,
7
+ "interval_width": 0.95,
8
+ "yearly_seasonality": true,
9
+ "weekly_seasonality": true,
10
+ "daily_seasonality": false
11
+ },
12
+ "training_data": {
13
+ "train_days": 1913,
14
+ "test_days": 28,
15
+ "train_start": "2011-01-29 00:00:00",
16
+ "train_end": "2016-04-24 00:00:00"
17
+ },
18
+ "metrics": {
19
+ "rmse": 4860.667344419225,
20
+ "mae": 4038.7328999714914,
21
+ "mape": 8.72544270105418,
22
+ "method": "Prophet",
23
+ "train_days": 1913,
24
+ "test_days": 28
25
+ }
26
+ }
predictions.csv ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ds,yhat,yhat_lower,yhat_upper,actual
2
+ 2016-04-25,39254.467440922606,31836.624377638233,47036.46165501246,38793
3
+ 2016-04-26,36610.296198477736,28858.172508254553,43907.191456687244,35487
4
+ 2016-04-27,36210.140510744444,29193.283393479192,43944.29023817303,34445
5
+ 2016-04-28,36395.444846217986,28946.259371366472,44699.72895518855,34732
6
+ 2016-04-29,40304.35427600765,32530.793478067466,47865.10152113736,42896
7
+ 2016-04-30,47633.16537853425,39594.14905720591,55075.22556346202,50429
8
+ 2016-05-01,47318.62557107206,39389.34726787239,54955.79404097041,53032
9
+ 2016-05-02,39021.70580157089,31564.621027932782,46377.25028517124,43181
10
+ 2016-05-03,36388.54386872342,28576.56304055806,43994.36252523525,44314
11
+ 2016-05-04,35999.1126394052,28307.678507544584,44222.79216825604,39601
12
+ 2016-05-05,36195.33998994194,28858.27393807581,43971.41213466942,40763
13
+ 2016-05-06,40115.92896096246,32167.33339459978,47222.236441778005,43805
14
+ 2016-05-07,47457.78487059798,40125.73017181905,55327.32956716333,54239
15
+ 2016-05-08,47158.28866650553,40099.11075088863,55274.76245860533,45609
16
+ 2016-05-09,38879.04233182522,31197.655554797708,46481.524560741396,46400
17
+ 2016-05-10,36266.784539353095,28705.20178952603,44111.75218321134,39379
18
+ 2016-05-11,35902.031762547784,28258.142838596832,43221.27793777325,42248
19
+ 2016-05-12,36127.17259428993,28148.187036160514,43014.81134424051,40503
20
+ 2016-05-13,40081.264642147784,32450.066458337493,47653.14394930315,44073
21
+ 2016-05-14,47461.441551219505,39908.998880902865,54534.09808792956,54308
22
+ 2016-05-15,47205.17014213418,39934.36195277914,54382.35000774419,59921
23
+ 2016-05-16,38973.98406590814,31296.96257934955,46614.49459466319,42362
24
+ 2016-05-17,36414.39261513052,29153.709198505097,44302.76967825718,38777
25
+ 2016-05-18,36106.52019162111,28680.133187056188,43749.79952585025,37096
26
+ 2016-05-19,36392.20430786937,28817.976394680725,44076.299951534624,36963
27
+ 2016-05-20,40409.80144841674,33069.228148915834,47877.14038247709,42552
28
+ 2016-05-21,47855.6081312843,40201.74397726433,55578.45434120635,51518
29
+ 2016-05-22,47666.13678310303,39785.505706669035,54927.744684018,54338