rishini commited on
Commit
a66b958
·
verified ·
1 Parent(s): a66f013

Upload arima model with evaluation metrics

Browse files
Files changed (5) hide show
  1. README.md +45 -0
  2. metrics.json +15 -0
  3. model.pkl +3 -0
  4. model_config.json +36 -0
  5. predictions.csv +29 -0
README.md ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ARIMA Model for M5 Demand Forecasting
2
+
3
+ ## Overview
4
+ AutoRegressive Integrated Moving Average trained on aggregated daily M5 sales data.
5
+
6
+ ## Model Details
7
+ - **Architecture**: ARIMA(3,1,1) with trend
8
+ - **Training Data**: 1,913 days of aggregated daily sales
9
+ - **Test Period**: 28 days (2016-04-25 to 2016-05-22)
10
+ - **Differencing**: d=1 (first differencing required for stationarity)
11
+
12
+ ## Stationarity Test
13
+ - ADF Statistic: -1.565373
14
+ - p-value: 0.500960
15
+ - Original data non-stationary; first differencing achieves stationarity
16
+
17
+ ## Performance
18
+ | Metric | Value |
19
+ |--------|-------|
20
+ | RMSE | 6,459.70 |
21
+ | MAE | 4,852.62 |
22
+ | MAPE | 10.48% |
23
+ | AIC | 37,801.28 |
24
+
25
+ ## Key Features
26
+ - AR component: 3 autoregressive terms
27
+ - I component: 1st order differencing (d=1)
28
+ - MA component: 1 moving average term
29
+ - Trend term: 't' (deterministic trend)
30
+
31
+ ## Usage
32
+ ```python
33
+ import pickle
34
+
35
+ with open('model.pkl', 'rb') as f:
36
+ model = pickle.load(f)
37
+
38
+ forecast = model.forecast(steps=28)
39
+ ```
40
+
41
+ ## Notes
42
+ - Simplest model but requires manual order selection
43
+ - No seasonal component (SARIMAX handles this better)
44
+ - Good baseline but underperforms compared to Prophet and SARIMAX
45
+ - Smallest model file (6.5MB) due to no seasonal components
metrics.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "rmse": 6459.701299981527,
3
+ "mae": 4852.6228457663765,
4
+ "mape": 10.475306061903403,
5
+ "method": "ARIMA",
6
+ "order": [
7
+ 3,
8
+ 1,
9
+ 1
10
+ ],
11
+ "d_value": 1,
12
+ "train_days": 1913,
13
+ "test_days": 28,
14
+ "adf_pvalue": 0.5009604361797737
15
+ }
model.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9a186737a57e95e4769377efca1d3859683eff2a2cde59ff52c88028fc88f188
3
+ size 6870504
model_config.json ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_name": "ARIMA",
3
+ "hyperparameters": {
4
+ "order": [
5
+ 3,
6
+ 1,
7
+ 1
8
+ ],
9
+ "trend": "t",
10
+ "stationary": 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
+ "stationarity_test": "ADF",
18
+ "adf_statistic": -1.5653733253318483,
19
+ "adf_pvalue": 0.5009604361797737
20
+ },
21
+ "metrics": {
22
+ "rmse": 6459.701299981527,
23
+ "mae": 4852.6228457663765,
24
+ "mape": 10.475306061903403,
25
+ "method": "ARIMA",
26
+ "order": [
27
+ 3,
28
+ 1,
29
+ 1
30
+ ],
31
+ "d_value": 1,
32
+ "train_days": 1913,
33
+ "test_days": 28,
34
+ "adf_pvalue": 0.5009604361797737
35
+ }
36
+ }
predictions.csv ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ds,yhat,actual
2
+ 2016-04-25,45190.990259355225,38793
3
+ 2016-04-26,40583.77766973429,35487
4
+ 2016-04-27,39073.7103863895,34445
5
+ 2016-04-28,40454.294880894406,34732
6
+ 2016-04-29,42624.609787427515,42896
7
+ 2016-04-30,43799.831241559645,50429
8
+ 2016-05-01,43589.1120619281,53032
9
+ 2016-05-02,42700.7718190461,43181
10
+ 2016-05-03,42017.34031237138,44314
11
+ 2016-05-04,41926.30052133391,39601
12
+ 2016-05-05,42256.61094459382,40763
13
+ 2016-05-06,42620.14437307269,43805
14
+ 2016-05-07,42762.768288819745,54239
15
+ 2016-05-08,42682.846685461045,45609
16
+ 2016-05-09,42530.503889281834,46400
17
+ 2016-05-10,42444.48207322392,39379
18
+ 2016-05-11,42462.53115942328,42248
19
+ 2016-05-12,42536.51388263449,40503
20
+ 2016-05-13,42599.7324861895,44073
21
+ 2016-05-14,42619.7006711,54308
22
+ 2016-05-15,42606.40123128623,59921
23
+ 2016-05-16,42588.37788685298,42362
24
+ 2016-05-17,42585.86841938702,38777
25
+ 2016-05-18,42600.41418280065,37096
26
+ 2016-05-19,42621.35490978869,36963
27
+ 2016-05-20,42637.98826800487,42552
28
+ 2016-05-21,42646.85333683171,51518
29
+ 2016-05-22,42651.15957858302,54338