100% found this document useful (1 vote)
142 views69 pages

Time Series Forecasting - Rose - Buisness Report

1. The wine sales data was split into a training set (up to 1990) and test set (1991 onwards) 2. Various forecasting models like exponential smoothing, regression, naive forecast, simple average were fitted on the training set 3. The performance of each model was evaluated on the test set using RMSE as the error metric 4. This process allowed identifying the best performing models for forecasting future wine sales based on past data.

Uploaded by

Priyanka Patil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
142 views69 pages

Time Series Forecasting - Rose - Buisness Report

1. The wine sales data was split into a training set (up to 1990) and test set (1991 onwards) 2. Various forecasting models like exponential smoothing, regression, naive forecast, simple average were fitted on the training set 3. The performance of each model was evaluated on the test set using RMSE as the error metric 4. This process allowed identifying the best performing models for forecasting future wine sales based on past data.

Uploaded by

Priyanka Patil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 69

Time Series Forecasting-Rose

Project - Time Series Forecasting (Rose)


Name – Priyanka Sanjay Patil
PGP-DSBA Online May’ 22
Date: 25/12/2022

1
Time Series Forecasting-Rose

Content:
Problem Statement………………………………………………………………………………………………………………………04

1. Read the data as an appropriate Time Series data and plot the data…………………………………………04
2. Perform appropriate Exploratory Data Analysis to understand the data and perform
decomposition………………………………………………………………………………………………………………………….06
3. Split the data into training and test. The test data should start in 1991…………………………………….14
4.  Build all the exponential smoothing models on the training data and evaluate the model using
RMSE on the test data. Other additional models such as regression, naïve forecast models,
simple average models, moving average models should also be built on the training data and
check the performance on the test data using RMSE………………………………………………………………..15
5. Check for the stationarity of the data on which the model is being built on using appropriate
statistical tests and mention the hypothesis for the statistical test. If the data is found to be non-
stationary, take appropriate steps to make it stationary. Check the new data for stationarity and
comment…………………………………………………………………………………………………………………………………..33
Note: Stationarity should be checked at alpha = 0.05.
6. Build an automated version of the ARIMA/SARIMA model in which the parameters are selected
using the lowest Akaike Information Criteria (AIC) on the training data and evaluate this model
on the test data using RMSE……………………………………………………………………………………………………35
7. Build ARIMA/SARIMA models based on the cut-off points of ACF and PACF on the training data
and evaluate this model on the test data using RMSE……………………………………………………………….54
8. Build a table with all the models built along with their corresponding parameters and the
respective RMSE values on the test data…………………………………………………………………………………..64
9. Based on the model-building exercise, build the most optimum model(s) on the complete data
and predict 12 months into the future with appropriate confidence intervals/bands……………….65
10. Comment on the model thus built and report your findings and suggest the measures that the
company should be taking for future sales………………………………………………………………………………..68

2
Time Series Forecasting-Rose

Figure Table:
1. Rose Year wise data plot ……………………………………………………………………………………………………..…07
2. Month wise data plot………………………………………………………………………………………………………………08
3. Monthly Sales across Year..……………………………………………………………………………………………………..09
4. Time Series Plot ….……………………………………………………………………………………………………………………09
5. Empirical Cumulative Distribution…………………………………………………………………………………………..10
6. Average Rose, and precent change...……………………………………………………………………………………….11
7. Multiplicative decomposition ..…………………………………………………………………………………………………12
8. Additive decomposition . …………………………………………………………………………………………………………17
9. Linear Regression Model. …………………………………………………………………………………………………………18
10. Linear Regression Model. ………………………………………………………………………………………………………..20
11. Naïve Forecast. ………………………………………………………………………………………………………………………..21
12. Simple average forecast. …………………………………………………………………………………………………………24
13. Moving Average ………………………………………………………………………………………………………………………29
14. Plotting on the whole data. ………………………………………………………………………………………………………31
15. Plotting on both the Training and Test data………………………………………………………………..…………….33
16. Simple Exponential Smoothing……..…………………………………………………………………………………………..33
17. Triple Exponential Smoothing (Holt - Winter's Model)………………………………………………………………33
18. Rose TES forecast ..…………………………………………………………………………………………………………………..33
19. Rolling mean and Standard deviation…….…………………………………………………………………………………34
20. Automated ARIMA. ………………………………………………………………………………………………………..………..37
21. Automated SARIMA model……………………………………………………………………………………………………….38
22. Log Data Autocorrelation(acf)…….…………………………………………………………………………………………….45
23. Log Data Difference Autocorrelation(acf). ……………………………………………………………………………….45
24. Log Data Autocorrelation(pacf)………………………………………………………………………………………………..46
25. Log Data Difference Autocorrelation(pacf)……………………………………………………………………………..46
26. Manual ARIMA. ………………………………………………………………………………………………………………………..55
27. Manual SARIMA . …………………………………………………………………………………………………………………….63
28. The forecast along with the confidence band………………………………………………………………………….67

3
Time Series Forecasting-Rose

Problem Statement:

For this particular assignment, the data of different types of wine sales in the 20th century is to be
analyzed. Both of these data are from the same company but of different wines. As an analyst in the ABC
Estate Wines, you are tasked to analyse and forecast Wine Sales in the 20th century

Data set for the Problem:  Rose.csv

Importing all necessary libraries into Jupiter notebook

1.Read the data as an appropriate Time Series data and plot the data.
Solution:
Solution:

The shape of the data is

In this data we have 187 rows and 2 columns.

Head and Tail of the Data set-

4
Time Series Forecasting-Rose

 We seen above plot , there is an decreasing trend in the initial years which stabilizes after few
years and again shows a decreasing trend

 We also observe seasonality in the data trend and patterns seem to repeat on yearly basis.

5
Time Series Forecasting-Rose

2. Perform appropriate Exploratory Data Analysis to understand the data and


also perform decomposition.
Solution:
We have 187 data points in Rose wine data with two missing values .

6
Time Series Forecasting-Rose

Yearly Boxplot

Rose Monthly Boxplot

7
Time Series Forecasting-Rose

 As observed in the time series plot , the year wise box plots over here also indicate a measure
of downward trend.
 Also, we see that the sales of Rose wine has some outliers for certain years.
 December seems to have the highest sales of the Rose wine and there are also outlier in June,
July, august, September months.

Plot a graph of monthly Sparkling across years

8
Time Series Forecasting-Rose

 We observe from the above line plots of year and month wise sales data of Rose wine that
December month has the highest sales and January , February, and March month shows lower
sales values.

 We have around 7.791666666666667 days of data.

 Time Series Plot-

9
Time Series Forecasting-Rose

Empirical Cumulative Distribution.

 group by date and get average Rose, and precent change


 plot average Rose over time(year-month)
 plot precent change for Rose over time(year-month)

10
Time Series Forecasting-Rose

Decompose the Time Series


Multiplicative-

Additive-

11
Time Series Forecasting-Rose

 For additive We see the residual values are around 0 and for multiplicative model we see the
residuals are around 1

12
Time Series Forecasting-Rose

13
Time Series Forecasting-Rose

3. Split the data into training and test. The test data should start in 1991.
Solution:

Shape of the train test data-

(132, 1)
(55, 1)

14
Time Series Forecasting-Rose

 The train data of Rose wine sales has been split for data up to 1990 and 132 data points.
 The test data of Rose wine sales has been split for data from 1991 and has 55 points.
 From our train test split we are predicting the future sales as compared to the past years.

4. Build all the exponential smoothing models on the training data and evaluate
the model using RMSE on the test data. Other models such as regression, naïve
forecast models and simple average models. should also be built on the training
data and check the performance on the test data using RMSE.
Solution:

 Model 1: Linear Regression


 For this particular linear regression, we are going to regress the ‘sales’ variable against the order
of the occurrence.
 Training Time/ Test time Instance

15
Time Series Forecasting-Rose

16
Time Series Forecasting-Rose

Rose sales -Linear Regression Model-

Evaluate this model on the test data using Root Mean Squared Error (RMSE)
For Regression On Time forecast on the Test Data, RMSE is 15.269

Model-2 Naive Forecast


Naïve model for Rose sales ,

NaiveModel_train

17
Time Series Forecasting-Rose

Naïve Model_test

Naïve Forecast-

 From the above plot , we observe that the red line in the chart which shows the naïve forecast
plotting is a straight line given the naïve models approach where Sales for tomorrow is the same
as today and it applies to all future periods.

Model Evaluation
 For Naive forecast on the Test Data, RMSE is 79.719

18
Time Series Forecasting-Rose

Model 3-Simple Average


Simple Average model got the test RMSE score=53.46

Simple Average Forecast-

19
Time Series Forecasting-Rose

As per above plot, we observe that the red line in the chart shows the Simple Average Forecast plotting
is a straight line given the Simple Average models approach where we use the averages Sales value to
forecast future Sales.

Model Evaluation

Model 4: Moving Average

Moving Average model for Rose sale computed the moving averages for 2,4,6,9 point intervals.

20
Time Series Forecasting-Rose

Trailing moving averages

21
Time Series Forecasting-Rose

Model Evaluation Done only on the test data.

 For 2 point Moving Average Model forecast on the Training Data, RMSE is 11.529
 For 4 point Moving Average Model forecast on the Training Data, RMSE is 14.451
 For 6 point Moving Average Model forecast on the Training Data, RMSE is 14.566
 For 9 point Moving Average Model forecast on the Training Data, RMSE is 14.728

Before we go on to build the various Exponential Smoothing models, let us plot all the models and
compare the Time Series plots.

22
Time Series Forecasting-Rose

Method 5: Simple Exponential Smoothing

23
Time Series Forecasting-Rose

Model Evaluation for 𝛼 = 0.995 : Simple Exponential Smoothing

For Alpha =0.995 Simple Exponential Smoothing Model forecast on the Test Data, RMSE is 36.796

Setting different alpha values.-

Model Evaluation

24
Time Series Forecasting-Rose

25
Time Series Forecasting-Rose

Method 6: Double Exponential Smoothing (Holt's Model)

Two parameters 𝛼 and 𝛽 are estimated in this model. Level and Trend are accounted for in this model.

Model Evaluation for Alpha = 0.68 and Beta = 0.0 : DES-Autofit Model:

For Alpha =0.68 Double Exponential Smoothing Model forecast on the Test Data, RMSE is 15.707

26
Time Series Forecasting-Rose

27
Time Series Forecasting-Rose

Model 7: Triple Exponential Smoothing (Holt - Winter's Model)

The above fit of the model is by the best parameters that Python thinks for the model. It uses a brute
force method to choose the parameters.

28
Time Series Forecasting-Rose

Model Evaluation for alpha = 0.11 and beta = 0.7 gama= 0.395 : TES-Autofit Model:

For Auto-fit Triple Exponential Smoothing Model forecast on the Test Data, RMSE is 20.157

29
Time Series Forecasting-Rose

Iterative Method for Triple Exponential Smoothing

Model Evaluation based on Iterations:

30
Time Series Forecasting-Rose

31
Time Series Forecasting-Rose

Plot all above models

32
Time Series Forecasting-Rose

5. Check for the stationarity of the data on which the model is being built on
using appropriate statistical tests and also mention the hypothesis for the
statistical test. If the data is found to be non-stationary, take appropriate steps
to make it stationary. Check the new data for stationarity and comment. Note:
Stationarity should be checked at alpha = 0.05.
Solution:

 We check the Stationarity of the Rose Sales data at alpha 0.05 and observe from the following
result table that p value is greater than alpha value.
 Hence we fail reject the null hypothesis that the data is not stationary.

33
Time Series Forecasting-Rose

Rolling mean and standard deviation

We see that at = 0.05 the Time Series is indeed stationary. d=1


Plot the Autocorrelation and the Partial Autocorrelation function plots on the whole data.

34
Time Series Forecasting-Rose

6. Build an automated version of the ARIMA/SARIMA model in which the


parameters are selected using the lowest Akaike Information Criteria (AIC) on
the training data and evaluate this model on the test data using RMSE.

Solution:

35
Time Series Forecasting-Rose

36
Time Series Forecasting-Rose

Automated ARIMA -Rose

 We see there is some seasonality in data.


 In automated ARIMA model for Rose Sales and sorted the AIC values output from lowest to
highest.
 Then proceed to build the ARIMA model with the lowest Akaike Information Criteria.

Predict on the Test Set using this model and evaluate the model.

RMSE: 37.30647971852104
MAPE: 76.93545693305195

37
Time Series Forecasting-Rose

Build an Automated version of a SARIMA model for which the best parameters are selected in
accordance with the lowest Akaike Information Criteria (AIC).

Automated SARIMA-

38
Time Series Forecasting-Rose

 We observe the ACF plot for Rose sales and observe seasonality at intervals 12, hence we run
the Automated SARIMA models at seasonality .
 And sorted the AIC values output from lowest to highest .
 We then proceed to build the SARIMA model with the lowest Akaike Information Criteria.

39
Time Series Forecasting-Rose

40
Time Series Forecasting-Rose

41
Time Series Forecasting-Rose

42
Time Series Forecasting-Rose

Predict on the Test Set using this model and evaluate the model.

43
Time Series Forecasting-Rose

For Auto-SARIMA Model forecast on the Test Data, RMSE is 16.097

Model-9B AUTO SARIMA on Log Series


<Figure size 1296x648 with 0 Axes>

44
Time Series Forecasting-Rose

45
Time Series Forecasting-Rose

46
Time Series Forecasting-Rose

SARIMA (0, 1, 0)x(0, 0, 0, 12)7 - AIC:-132.2811508841321


SARIMA(0, 1, 0)x(0, 0, 1, 12)7 - AIC:-151.244020590174
SARIMA(0, 1, 0)x(0, 0, 2, 12)7 - AIC:-163.20900777080084
SARIMA(0, 1, 0)x(0, 1, 0, 12)7 - AIC:-151.39741606038652
SARIMA(0, 1, 0)x(0, 1, 1, 12)7 - AIC:-195.6981021193257
SARIMA(0, 1, 0)x(0, 1, 2, 12)7 - AIC:-168.63061361261686
SARIMA(0, 1, 0)x(1, 0, 0, 12)7 - AIC:-176.1467936067722
SARIMA(0, 1, 0)x(1, 0, 1, 12)7 - AIC:-193.80943153461936
SARIMA(0, 1, 0)x(1, 0, 2, 12)7 - AIC:-182.39902107833242
SARIMA(0, 1, 0)x(1, 1, 0, 12)7 - AIC:-184.19318049207516
SARIMA(0, 1, 0)x(1, 1, 1, 12)7 - AIC:-184.99828084718195
SARIMA(0, 1, 0)x(1, 1, 2, 12)7 - AIC:-167.6975078384536
SARIMA(0, 1, 0)x(2, 0, 0, 12)7 - AIC:-189.56133415835777
SARIMA(0, 1, 0)x(2, 0, 1, 12)7 - AIC:-189.050049208318
SARIMA(0, 1, 0)x(2, 0, 2, 12)7 - AIC:-188.6755019005455
SARIMA(0, 1, 0)x(2, 1, 0, 12)7 - AIC:-163.31782076512172
SARIMA(0, 1, 0)x(2, 1, 1, 12)7 - AIC:-165.3515520056285
SARIMA(0, 1, 0)x(2, 1, 2, 12)7 - AIC:-165.20270815722986
SARIMA(0, 1, 1)x(0, 0, 0, 12)7 - AIC:-180.16317688315075
SARIMA(0, 1, 1)x(0, 0, 1, 12)7 - AIC:-193.9888499719578
SARIMA(0, 1, 1)x(0, 0, 2, 12)7 - AIC:-205.88038323158116
SARIMA(0, 1, 1)x(0, 1, 0, 12)7 - AIC:-201.16086973215872
SARIMA(0, 1, 1)x(0, 1, 1, 12)7 - AIC:-245.31562333636523
SARIMA(0, 1, 1)x(0, 1, 2, 12)7 - AIC:-215.71778313665465
SARIMA(0, 1, 1)x(1, 0, 0, 12)7 - AIC:-226.46068035197877
SARIMA(0, 1, 1)x(1, 0, 1, 12)7 - AIC:-247.07640826703775
SARIMA(0, 1, 1)x(1, 0, 2, 12)7 - AIC:-225.17137553037313
SARIMA(0, 1, 1)x(1, 1, 0, 12)7 - AIC:-227.96854220712822
SARIMA(0, 1, 1)x(1, 1, 1, 12)7 - AIC:-224.91037290404438
SARIMA(0, 1, 1)x(1, 1, 2, 12)7 - AIC:-213.99037737711552
SARIMA(0, 1, 1)x(2, 0, 0, 12)7 - AIC:-238.8703523133768
SARIMA(0, 1, 1)x(2, 0, 1, 12)7 - AIC:-236.8730041868172

47
Time Series Forecasting-Rose

SARIMA(0, 1, 1)x(2, 0, 2, 12)7 - AIC:-233.27824112606888


SARIMA(0, 1, 1)x(2, 1, 0, 12)7 - AIC:-211.7084801861823
SARIMA(0, 1, 1)x(2, 1, 1, 12)7 - AIC:-213.56045303354296
SARIMA(0, 1, 1)x(2, 1, 2, 12)7 - AIC:-213.9837158226101
SARIMA(0, 1, 2)x(0, 0, 0, 12)7 - AIC:-180.90674393579218
SARIMA(0, 1, 2)x(0, 0, 1, 12)7 - AIC:-195.15144478593774
SARIMA(0, 1, 2)x(0, 0, 2, 12)7 - AIC:-204.86494785545204
SARIMA(0, 1, 2)x(0, 1, 0, 12)7 - AIC:-201.89225879427786
SARIMA(0, 1, 2)x(0, 1, 1, 12)7 - AIC:-242.23212504707402
SARIMA(0, 1, 2)x(0, 1, 2, 12)7 - AIC:-211.40880003603127
SARIMA(0, 1, 2)x(1, 0, 0, 12)7 - AIC:-229.57397152067722
SARIMA(0, 1, 2)x(1, 0, 1, 12)7 - AIC:-243.81884618095475
SARIMA(0, 1, 2)x(1, 0, 2, 12)7 - AIC:-227.0706723025021
SARIMA(0, 1, 2)x(1, 1, 0, 12)7 - AIC:-229.6060688888845
SARIMA(0, 1, 2)x(1, 1, 1, 12)7 - AIC:-226.58393793792686
SARIMA(0, 1, 2)x(1, 1, 2, 12)7 - AIC:-209.78622094039613
SARIMA(0, 1, 2)x(2, 0, 0, 12)7 - AIC:-239.81418500756365
SARIMA(0, 1, 2)x(2, 0, 1, 12)7 - AIC:-237.87796138204587
SARIMA(0, 1, 2)x(2, 0, 2, 12)7 - AIC:-235.5351182466629
SARIMA(0, 1, 2)x(2, 1, 0, 12)7 - AIC:-210.5434102548726
SARIMA(0, 1, 2)x(2, 1, 1, 12)7 - AIC:-211.93556314293627
SARIMA(0, 1, 2)x(2, 1, 2, 12)7 - AIC:-210.12841757640513
SARIMA(1, 1, 0)x(0, 0, 0, 12)7 - AIC:-148.66657556379576
SARIMA(1, 1, 0)x(0, 0, 1, 12)7 - AIC:-165.57392474613283
SARIMA(1, 1, 0)x(0, 0, 2, 12)7 - AIC:-177.05292859276815
SARIMA(1, 1, 0)x(0, 1, 0, 12)7 - AIC:-161.81472953636262
SARIMA(1, 1, 0)x(0, 1, 1, 12)7 - AIC:-210.40657410036263
SARIMA(1, 1, 0)x(0, 1, 2, 12)7 - AIC:-185.95217008389017
SARIMA(1, 1, 0)x(1, 0, 0, 12)7 - AIC:-184.88200535862978
SARIMA(1, 1, 0)x(1, 0, 1, 12)7 - AIC:-207.51664259928677
SARIMA(1, 1, 0)x(1, 0, 2, 12)7 - AIC:-195.97453601066
SARIMA(1, 1, 0)x(1, 1, 0, 12)7 - AIC:-195.19182223783673
SARIMA(1, 1, 0)x(1, 1, 1, 12)7 - AIC:-197.24859983742797
SARIMA(1, 1, 0)x(1, 1, 2, 12)7 - AIC:-184.69208894704443
SARIMA(1, 1, 0)x(2, 0, 0, 12)7 - AIC:-201.83483594489596
SARIMA(1, 1, 0)x(2, 0, 1, 12)7 - AIC:-200.27919754603136
SARIMA(1, 1, 0)x(2, 0, 2, 12)7 - AIC:-202.83686640666812
SARIMA(1, 1, 0)x(2, 1, 0, 12)7 - AIC:-181.30079525476535
SARIMA(1, 1, 0)x(2, 1, 1, 12)7 - AIC:-181.45308965768712
SARIMA(1, 1, 0)x(2, 1, 2, 12)7 - AIC:-183.62499466691818
SARIMA(1, 1, 1)x(0, 0, 0, 12)7 - AIC:-181.82485136971945
SARIMA(1, 1, 1)x(0, 0, 1, 12)7 - AIC:-195.90180087554361
SARIMA(1, 1, 1)x(0, 0, 2, 12)7 - AIC:-206.14977983655984
SARIMA(1, 1, 1)x(0, 1, 0, 12)7 - AIC:-203.19120461083023

48
Time Series Forecasting-Rose

SARIMA(1, 1, 1)x(0, 1, 1, 12)7 - AIC:-244.19410043636825


SARIMA(1, 1, 1)x(0, 1, 2, 12)7 - AIC:-214.22123310861681
SARIMA(1, 1, 1)x(1, 0, 0, 12)7 - AIC:-225.8978007957412
SARIMA(1, 1, 1)x(1, 0, 1, 12)7 - AIC:-246.52380346242956
SARIMA(1, 1, 1)x(1, 0, 2, 12)7 - AIC:-226.36033935290723
SARIMA(1, 1, 1)x(1, 1, 0, 12)7 - AIC:-227.10895290066057
SARIMA(1, 1, 1)x(1, 1, 1, 12)7 - AIC:-225.59590672325305
SARIMA(1, 1, 1)x(1, 1, 2, 12)7 - AIC:-212.5164966690137
SARIMA(1, 1, 1)x(2, 0, 0, 12)7 - AIC:-236.63151412035333
SARIMA(1, 1, 1)x(2, 0, 1, 12)7 - AIC:-235.0347267322707
SARIMA(1, 1, 1)x(2, 0, 2, 12)7 - AIC:-233.1383755099988
SARIMA(1, 1, 1)x(2, 1, 0, 12)7 - AIC:-211.03141411898363
SARIMA(1, 1, 1)x(2, 1, 1, 12)7 - AIC:-212.88612607006576
SARIMA(1, 1, 1)x(2, 1, 2, 12)7 - AIC:-210.3758281445037
SARIMA(1, 1, 2)x(0, 0, 0, 12)7 - AIC:-180.26441474318858
SARIMA(1, 1, 2)x(0, 0, 1, 12)7 - AIC:-193.15178444128674
SARIMA(1, 1, 2)x(0, 0, 2, 12)7 - AIC:-202.36341719069281
SARIMA(1, 1, 2)x(0, 1, 0, 12)7 - AIC:-200.3511240415673
SARIMA(1, 1, 2)x(0, 1, 1, 12)7 - AIC:-243.15204338685749
SARIMA(1, 1, 2)x(0, 1, 2, 12)7 - AIC:-209.40934448436673
SARIMA(1, 1, 2)x(1, 0, 0, 12)7 - AIC:-225.49521310551367
SARIMA(1, 1, 2)x(1, 0, 1, 12)7 - AIC:-245.792457235462
SARIMA(1, 1, 2)x(1, 0, 2, 12)7 - AIC:-225.4637542147779
SARIMA(1, 1, 2)x(1, 1, 0, 12)7 - AIC:-225.47007435933148
SARIMA(1, 1, 2)x(1, 1, 1, 12)7 - AIC:-224.61591403129017
SARIMA(1, 1, 2)x(1, 1, 2, 12)7 - AIC:-207.73619841510492
SARIMA(1, 1, 2)x(2, 0, 0, 12)7 - AIC:-235.62223961882913
SARIMA(1, 1, 2)x(2, 0, 1, 12)7 - AIC:-233.63929945041494
SARIMA(1, 1, 2)x(2, 0, 2, 12)7 - AIC:-233.3337250018956
SARIMA(1, 1, 2)x(2, 1, 0, 12)7 - AIC:-209.06037203741133
SARIMA(1, 1, 2)x(2, 1, 1, 12)7 - AIC:-211.35956310520672
SARIMA(1, 1, 2)x(2, 1, 2, 12)7 - AIC:-206.63894866111002
SARIMA(2, 1, 0)x(0, 0, 0, 12)7 - AIC:-162.05049979882875
SARIMA(2, 1, 0)x(0, 0, 1, 12)7 - AIC:-172.67759303481262
SARIMA(2, 1, 0)x(0, 0, 2, 12)7 - AIC:-183.51513403153479
SARIMA(2, 1, 0)x(0, 1, 0, 12)7 - AIC:-170.97394380093536
SARIMA(2, 1, 0)x(0, 1, 1, 12)7 - AIC:-216.01650879310984
SARIMA (2, 1, 0)x(0, 1, 2, 12)7 - AIC:-190.22656692533533
SARIMA(2, 1, 0)x(1, 0, 0, 12)7 - AIC:-192.7064355832733
SARIMA(2, 1, 0)x(1, 0, 1, 12)7 - AIC:-218.07090964915596
SARIMA(2, 1, 0)x(1, 0, 2, 12)7 - AIC:-201.83724555458576
SARIMA(2, 1, 0)x(1, 1, 0, 12)7 - AIC:-198.5616077738357
SARIMA(2, 1, 0)x(1, 1, 1, 12)7 - AIC:-200.15579716349393
SARIMA(2, 1, 0)x(1, 1, 2, 12)7 - AIC:-188.84022398766436

49
Time Series Forecasting-Rose

SARIMA(2, 1, 0)x(2, 0, 0, 12)7 - AIC:-206.07526372423365


SARIMA(2, 1, 0)x(2, 0, 1, 12)7 - AIC:-204.24887963977343
SARIMA(2, 1, 0)x(2, 0, 2, 12)7 - AIC:-205.9434255840147
SARIMA(2, 1, 0)x(2, 1, 0, 12)7 - AIC:-184.8484356689755
SARIMA(2, 1, 0)x(2, 1, 1, 12)7 - AIC:-186.3266999319437
SARIMA(2, 1, 0)x(2, 1, 2, 12)7 - AIC:-187.5159885785669
SARIMA(2, 1, 1)x(0, 0, 0, 12)7 - AIC:-180.18642237452679
SARIMA(2, 1, 1)x(0, 0, 1, 12)7 - AIC:-194.72043238988726
SARIMA(2, 1, 1)x(0, 0, 2, 12)7 - AIC:-205.38611372010445
SARIMA(2, 1, 1)x(0, 1, 0, 12)7 - AIC:-203.99973804866323
SARIMA(2, 1, 1)x(0, 1, 1, 12)7 - AIC:-243.36373632919324
SARIMA(2, 1, 1)x(0, 1, 2, 12)7 - AIC:-212.24003060259804
SARIMA(2, 1, 1)x(1, 0, 0, 12)7 - AIC:-224.0500226556257
SARIMA(2, 1, 1)x(1, 0, 1, 12)7 - AIC:-246.4719405631384
SARIMA(2, 1, 1)x(1, 0, 2, 12)7 - AIC:-225.25690028032204
SARIMA(2, 1, 1)x(1, 1, 0, 12)7 - AIC:-222.96973670247903
SARIMA(2, 1, 1)x(1, 1, 1, 12)7 - AIC:-224.9167452805271
SARIMA(2, 1, 1)x(1, 1, 2, 12)7 - AIC:-211.06129268704686
SARIMA(2, 1, 1)x(2, 0, 0, 12)7 - AIC:-235.52221386905885
SARIMA(2, 1, 1)x(2, 0, 1, 12)7 - AIC:-233.66212655200292
SARIMA(2, 1, 1)x(2, 0, 2, 12)7 - AIC:-234.33048498377684
SARIMA(2, 1, 1)x(2, 1, 0, 12)7 - AIC:-207.10470079374795
SARIMA(2, 1, 1)x(2, 1, 1, 12)7 - AIC:-209.45566452798758
SARIMA(2, 1, 1)x(2, 1, 2, 12)7 - AIC:-210.3598613066263
SARIMA(2, 1, 2)x(0, 0, 0, 12)7 - AIC:-178.28757663775824
SARIMA(2, 1, 2)x(0, 0, 1, 12)7 - AIC:-190.77979633068972
SARIMA(2, 1, 2)x(0, 0, 2, 12)7 - AIC:-200.81603208923468
SARIMA(2, 1, 2)x(0, 1, 0, 12)7 - AIC:-199.75650443806578
SARIMA(2, 1, 2)x(0, 1, 1, 12)7 - AIC:-243.70797040940568
SARIMA(2, 1, 2)x(0, 1, 2, 12)7 - AIC:-208.47750202147697
SARIMA(2, 1, 2)x(1, 0, 0, 12)7 - AIC:-222.20025743600627
SARIMA(2, 1, 2)x(1, 0, 1, 12)7 - AIC:-243.81901016150658
SARIMA(2, 1, 2)x(1, 0, 2, 12)7 - AIC:-224.11787296729977
SARIMA(2, 1, 2)x(1, 1, 0, 12)7 - AIC:-222.2838596577579
SARIMA(2, 1, 2)x(1, 1, 1, 12)7 - AIC:-226.71108829257162
SARIMA(2, 1, 2)x(1, 1, 2, 12)7 - AIC:-205.681822307308
SARIMA(2, 1, 2)x(2, 0, 0, 12)7 - AIC:-231.56917873956712
SARIMA(2, 1, 2)x(2, 0, 1, 12)7 - AIC:-229.9386647282136
SARIMA(2, 1, 2)x(2, 0, 2, 12)7 - AIC:-231.6073809945741
SARIMA(2, 1, 2)x(2, 1, 0, 12)7 - AIC:-205.0874503067876
SARIMA(2, 1, 2)x(2, 1, 1, 12)7 - AIC:-207.25682696449135
SARIMA(2, 1, 2)x(2, 1, 2, 12)7 - AIC:-205.58273765530558

50
Time Series Forecasting-Rose

51
Time Series Forecasting-Rose

Predict on the Test Set using this model and evaluate the model.

52
Time Series Forecasting-Rose

For Auto-SARIMA_log Model forecast on the Test Data, RMSE is 17.889

53
Time Series Forecasting-Rose

7. Build ARIMA/SARIMA models based on the cut-off points of ACF and PACF on
the training data and evaluate this model on the test data using RMSE.
Solution:

Manual ARIMA-

We built manual ARIMA model for Rose sales, based on the ACF and PACF plots.

Hence, we choose AR parameters p values 5, Moving average parameter q value 2 and d value 1 based
on the below plots.

The test RMSE score at this p ,d ,q value of ARIMA model is 15.43

54
Time Series Forecasting-Rose

For Manual-ARIMA Model forecast on the Test Data, RMSE is 79.719

55
Time Series Forecasting-Rose

The data has some seasonality so we should build a SARIMA model to get better accuracy.

Model-11A Manual SARIMA

56
Time Series Forecasting-Rose

We built manual SARIMA model for Rose sales, based on the ACF and PACF plots.

Hence, we choose AR parameters p values 5, Moving average parameter q value 2 and d value 1 based
on the below plots. We then derived the seasonal parameters based on the seasonal cutoffs .

The test RMSE score at this p ,d ,q value of ARIMA model is 25.23

Look at the ACF and the PACF plots once more.

57
Time Series Forecasting-Rose

58
Time Series Forecasting-Rose

The marginal trend in the data is still seen

 Now we see that there is almost no trend present in the data. Seasonality is only present in the
data.
 Check the stationarity of the above series before fitting the SARIMA model.

59
Time Series Forecasting-Rose

Checking the ACF and the PACF plots for the new modified Time Series.

60
Time Series Forecasting-Rose

61
Time Series Forecasting-Rose

Predict on the Test Set using this model and evaluate the model.

62
Time Series Forecasting-Rose

For Manual-SARIMA Model forecast on the Test Data, RMSE is 15.732

63
Time Series Forecasting-Rose

8. Build a table (create a data frame) with all the models built along with their
corresponding
Solution:
 We have consolidated the test results from the various models built in the forecasting process of
the future Rose Wine sales and get the following Test RMSE scores sorted in order.
 The lowest score is 9.88.
 It was obtained from the Triple Exponential smoothing model which was run based on different
smoothing level, smoothing trend (Beta), and smoothing seasonality (Gamma) values ranging
from0.3 to 1.0.

parameters and the respective RMSE values on the test data.

64
Time Series Forecasting-Rose

9. Based on the model-building exercise, build the most optimum model(s) on


the complete data and predict 12 months into the future with appropriate
confidence intervals/bands.
Solution:

We observed from the RMSE scores that Triple Exponential would work better for the Rose Sales data
where we had seasonality and trend.

65
Time Series Forecasting-Rose

Build model on the entire dataset using best optimum model:

Which is Manual_SARIMA (3,1,1)(1,1,2,12) or Auto_SARIMA_log(0, 1, 1)(1, 0, 1, 12)


Building a Manual_SARIMA on the entire dataset

66
Time Series Forecasting-Rose

Forecast for the next 12 months using this model.


For Manual-SARIMA Model forecast on the Entire Data, RMSE is 33.507

Prediction plot-

The upper and lower confidence bands were calculated at 95% confidence intervals

67
Time Series Forecasting-Rose

10.Comment on the model thus built and report your findings and suggest the
measures that the company should be taking for future sales.
Solution:
Inference and Recommendation –
 Rose sales shows a decrease in trend compared to the previous years
 December Month shows the highest sales across the year while the value has come down
through the years from 1980-1994.
 The sales of Rose wine are Seasonal and also has trend , hence the company cannot have the
same stock through the year .
 The predictions would help here to plan the stock need basis the forecasted sales.
 The company should use the prediction results and capitalize on the high demand season and
ensure to source and supply high demand
 The company should use the prediction results to plan the low demand season to stock as per
the demand.

68
Time Series Forecasting-Rose

Thank You…!

69

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy