SlideShare a Scribd company logo
國立臺北護理健康大學 NTUHS
Prediction of
inventory management
Orozco Hsu
2021-05-27
1
About me
• Education
• NCU (MIS)、NCCU (CS)
• Work Experience
• Telecom big data Innovation
• AI projects
• Retail marketing technology
• User Group
• TW Spark User Group
• TW Hadoop User Group
• Taiwan Data Engineer Association Director
• Research
• Big Data/ ML/ AIOT/ AI Columnist
2
「How can you not get romantic about baseball ? 」
Tutorial
Content
3
Stationary of Time-Series
Forecasting with Seasonal or Periodic data
Homework
An accurate inventory prediction
Code
• Download code
• https://github.com/orozcohsu/ntunhs_2020/tree/master/alg_20210527
4
An accurate inventory prediction
5
An accurate inventory prediction
6
The blocks of Inventory Management System
An accurate inventory prediction
• Inventory forecasting, also known as demand planning, is the practice
of using past data, trends and known upcoming events to predict
needed inventory levels for a future period.
• An accurate forecasting ensures businesses have enough product to
fulfill customer orders and do not spend too little or too much on
inventory.
7
An accurate inventory prediction
• Data elements required for a success inventory forecasting include
• Current Inventory Levels
• OUTSTANDING purchase orders
• HISTORICAL TRENDLINES
• Forecasting period requirements
• Expected demand and SEASONALITY
• MAXIMUM possible stock levels
• Sales trends and velocity
8
Accurate inventory prediction
9
01 Future forecast period
02 Base demand
03 Variables and trends
04 Build model
05 Model tuning
Accurate inventory prediction
• Demand Factors (Base, trends, seasonality, qualitative…)
• An example of other demand factors that can impact or inflate your normal
base demand.
10
Accurate inventory prediction
• Demand types
• Demand of Product X, Y, Z varies considerably.
• Some will have consistently high demand over time, for others there could be
sporadic or low demand.
11
Quiz: What is the importance of demand forecasting?
Hint: Watch the video from https://youtu.be/DKJfForHw-w
What is demand forecasting?
Stationary of Time-Series
12
Stationary of Time-Series
• Introduction to Stationarity
• Stationarity is one of the most important concepts you will come across when
working with time series data. A stationary series is one in which the
properties – mean, variance and covariance, do not vary with time.
(a) The mean varies (increases) with time which results in an upward trend
(b) We do not see a trend in the series. A stationary series must have a constant variance
(c) The spread becomes closer as the time increases, which implies that the covariance is a function of time.
13
(a) (b) (c)
Stationary of Time-Series
• Stationary
• The mean, variance and covariance are constant with time.
• Most statistical models require the series to be stationary to make effective
and precise predictions.
• A stationary time series is the one for which the properties (namely mean,
variance and covariance) do not depend on time.
14
Stationary of Time-Series
• How to check the series is stationary?
• Use the ADF (Augmented Dickey Fuller) Test
• It helps us understand if the series is stationary or not
• Null hypothesis: The series has a unit root
• Alternate hypothesis: The series has no unit root.
check_stationary.ipynb
15
Null and Alternative Hypotheses
https://opentextbc.ca/introstatopenstax/chapter/null-and-alternative-hypotheses/
Stationary of Time-Series
• How to make our series to stationary: Differencing
• Compute the difference of consecutive terms in the series.
• Differencing is typically performed to get rid of the varying mean.
• How to make our series to stationary: Seasonal Differencing
• Calculate the difference between an observation and a previous observation
from the same season.
16
Stationary of Time-Series
• Time series data are expected to contain some white noise
component on top of the signal generated by the underlying process.
• When forecast ERRORS (y hat and y) are white noise, it means that all
of the signal information in the time series has been harnessed by the
model in order to make predictions.
y(t) = signal(t) + noise(t)
17
White noise:
A time series is white noise if the variables are random and
identically distributed with a mean of zero, autocorrelation is closer to 0.
Stationary of Time-Series
• How to make our series to stationary: Transformation
• Used to stabilize the non-constant variance of a series.
• Common transformation methods include power transform, square root, and
log transform.
• Check Durbin_Watson, ACF, Ljung box test of series after we process
our series.
making_a_time_series_stationary.ipynb
18
Stationary of Time-Series
19
Start
Random
Stationary
Non-
Stationary
White noise
(no pattern) terminated
Stationary
(original series is stationary)
Differencing
stationary
ARIMA model (Autoregressive
Integrated Moving Average model)
ARMA model (Autoregressive
moving average model)
Yes
No
No
Differencing
Yes
Forecasting with Seasonal or Periodic data
20
Forecasting with Seasonal or Periodic data
• Some useful tools
• Moving average forecasting (MA)
• Simple Exponential Smoothing forecasting(SES; holtwinters)
• Stepwise Autoregressive forecasting
• Autoregressive Integrated Moving Average model forecasting (ARIMA)
• A seasonal autoregressive integrated moving average (SARIMA)
• Autoregressive conditional heteroskedasticity forecasting (ARCH)
• Hidden Markov Model forecasting (HMM)
21
Forecasting with Seasonal or Periodic data
• A time series analysis focuses on a series of
data points ordered in time.
• If you’re a retailer, a time series analysis
can help you forecast daily sales volumes
to guide decisions around inventory and
better timing for marketing efforts.
• If you’re in the financial industry, a time
series analysis can allow you to forecast
stock prices for more effective investment
decisions.
• If you’re an agricultural company, a time
series analysis can be used for weather
forecasting to guide planning decisions
around planting and harvesting.
22
Forecasting with Seasonal or Periodic data
• Check any time series data for patterns that can affect the results, and
can inform which forecasting model to use.
23
Type Description
Irregular
Fluctuation
No pattern
Trend Increases, decreases, or stays the same over time
Seasonal or
Periodic
Pattern repeats periodically over time
Cyclical
Pattern that increases and decreases but usually related to non-
seasonal activity, like business cycles
Level The average of value
Forecasting with Seasonal or Periodic data
24
Forecasting with Seasonal or Periodic data
• Use my code and present those models
25
time_series_forecasting.ipynb
Forecasting with Seasonal or Periodic data
• Parameters: Additive model
• Usually represents a linear time series with fixed fluctuations and a fixed
period pattern.
• y(t) = Level + Trend + Seasonality + Cyclical/Noise/Random
• Parameters: Multiplicative model
• The fluctuations and cycles of the time series will change with time. It is a
non-linear time series, and most of the time series data of stocks fall into this
category.
• y(t) = Level * Trend * Seasonality * Cyclical/Noise/Random
26
We will use it for seasonal_decompose, check my code
Forecasting with Seasonal or Periodic data
• Simple Exponential Smoothing (SES)
• Suitable for time series data without trend or seasonal components.
• This model is using weighted averages of past observations to forecast new
values.
• Parameters:
• Determine the smoothing level α: Between 0 and 1 (Level equation)
• When α = 0, the forecasts are equal to the average of the historical data.
• When α = 1, the forecasts will be equal to the value of the last observation.
• Write the model RMSE in P33 table
27
Forecasting with Seasonal or Periodic data
• Holts Linear Trend Method
• Suitable for time series data with a trend component but without a seasonal
component.
• Expanding the SES method, the Holt method helps you forecast time series
data that HAS a trend.
• Parameters:
• Level smoothing parameter α: Between 0 and 1 (Level equation)
• Trend smoothing parameter β*: Between 0 and 1 (Trend equation)
• Write the model RMSE in P33 table
28
Forecasting with Seasonal or Periodic data
• Holt-Winters Seasonal Method
• Suitable for time series data with trend and/or seasonal components.
• Parameters:
• Seasonality smoothing parameter: γ
• Two general types of seasonality: Additive and Multiplicative (Check Page 26)
• Identify the frequency of seasonality m: m=4 (Quarterly seasonal pattern)
m=12 (Yearly seasonal pattern)
• Box-Cox transformations for data normalization
29
https://www.statisticshowto.com/box-cox-transformation
https://www.statsmodels.org/dev/generated/statsmodels.tsa.holtwinter
s.ExponentialSmoothing.fit.html
Homework2: Set use_boxcox to False, log, float to compare the result.
Forecasting with Seasonal or Periodic data
• SARIMA (Seasonal autoregressive integrated moving average)
• Suitable for time series data with trend and/or seasonal components
• ARIMA model looks at autocorrelations or serial correlations in the data, and
it looks at differences between values in the time series.
• SARIMA builds upon the concept of ARIMA but extends it to model the
seasonal elements in your data.
• Parameters (we need to find those SEVEN parameters):
• Trend elements:
• p: Trend autoregression order
• d: Trend difference order
• q: Trend moving average order
30
• Seasonal elements:
• P: Seasonal autoregression order
• D: Seasonal difference order
• Q: Seasonal moving average order
• m: The number of time steps for a single seasonal period
Forecasting with Seasonal or Periodic data
• Grid search
• A python package.
• It is a tuning technique that attempts to compute the optimum values of
hyperparameters.
• Find out the best value of (p, d, q, P, D, Q, m)
• Evaluation metric
• AIC (Akaike Information Criterion)
• The AIC measures how well a model fits the data while taking into account
the overall complexity of the model.
• Pick the combination with the LOWEST AIC value.
31
Forecasting with Seasonal or Periodic data
32
Check model’s residuals are near normally distributed.
This indicates we have found a WELL-FIT model suitable for our dataset.
Symmetry KDE line follow closely with N(0,1)
N(0,1) => mean =0, variance =1
If residuals are normally distributed, the
points will fall on the 45-degree
https://desktop.arcgis.com/en/arcmap/10.3/guide-
books/extensions/geostatistical-analyst/normal-qq-plot-and-
general-qq-plot.htm
Residuals have a low autocorrelation with the
lagged versions of itself, the majority of dots
fall into the blue shaded area
Forecasting with Seasonal or Periodic data
33
Algorithm RMSE
Simple Exponential Smoothing 108.63
Holts Linear Trend Method 305.25
Holt-Winters Seasonal Method
(multiplicative)
25.78
SARIMA (dynamic=False) 17.9
Homework3: Try to use Holt-Winters Seasonal Method to predict future sales value
Forecasting with Seasonal or Periodic data
34
Prediction: 1961-01-01 -> 1965-04-01
Homework
35
Homework
• Continue to use square root or power transformation on
Making_a_Time_Series_Stationary.ipynb series and compare with
better results.
• Set use_boxcox to False, log, float to compare the result.
• Try to use Holt-Winters Seasonal Method to predict future sales value
36

More Related Content

What's hot

Exponential Weighting Moving Average.
 Exponential Weighting Moving Average. Exponential Weighting Moving Average.
Exponential Weighting Moving Average.
Syed Waqar Hussain Shah
 
Time series, forecasting, and index numbers
Time series, forecasting, and index numbersTime series, forecasting, and index numbers
Time series, forecasting, and index numbers
Shakeel Nouman
 
Adj Exp Smoothing
Adj Exp SmoothingAdj Exp Smoothing
Adj Exp Smoothing
ahmad bassiouny
 
Time series
Time seriesTime series
Time series
Haitham Ahmed
 
Lesson08_new
Lesson08_newLesson08_new
Lesson08_new
shengvn
 
Week 4 forecasting - time series - smoothing and decomposition - m.awaluddin.t
Week 4   forecasting - time series - smoothing and decomposition - m.awaluddin.tWeek 4   forecasting - time series - smoothing and decomposition - m.awaluddin.t
Week 4 forecasting - time series - smoothing and decomposition - m.awaluddin.t
Maling Senk
 
Demand time series analysis and forecasting
Demand time series analysis and forecastingDemand time series analysis and forecasting
Demand time series analysis and forecasting
M Baddar
 
Moving average method maths ppt
Moving average method maths pptMoving average method maths ppt
Moving average method maths ppt
Abhishek Mahto
 
Time series mnr
Time series mnrTime series mnr
Time series mnr
NH Rao
 
Time series analysis- Part 2
Time series analysis- Part 2Time series analysis- Part 2
Time series analysis- Part 2
QuantUniversity
 
Time series analysis
Time series analysisTime series analysis
Time series analysis
Utkarsh Sharma
 
Data Science - Part X - Time Series Forecasting
Data Science - Part X - Time Series ForecastingData Science - Part X - Time Series Forecasting
Data Science - Part X - Time Series Forecasting
Derek Kane
 
Time series Forecasting
Time series ForecastingTime series Forecasting
Time series Forecasting
Roma Agrawal Sit
 
Trend and Seasonal Components
Trend and Seasonal ComponentsTrend and Seasonal Components
Trend and Seasonal Components
AnnaRevin
 
Trend and seasonal components/Abshor Marantika/Cindy Aprilia Anggaresta
Trend and seasonal components/Abshor Marantika/Cindy Aprilia AnggarestaTrend and seasonal components/Abshor Marantika/Cindy Aprilia Anggaresta
Trend and seasonal components/Abshor Marantika/Cindy Aprilia Anggaresta
CindyAprilia15
 
Analysis of time series
Analysis of time seriesAnalysis of time series
Analysis of time series
Pablosperessos
 
Demand forecasting by time series analysis
Demand forecasting by time series analysisDemand forecasting by time series analysis
Demand forecasting by time series analysis
Sunny Gandhi
 
Machine Learning - Time Series
Machine Learning - Time Series Machine Learning - Time Series
Machine Learning - Time Series
Rupak Roy
 
Machine Learning - Time Series Part 2
Machine Learning - Time Series Part 2Machine Learning - Time Series Part 2
Machine Learning - Time Series Part 2
Rupak Roy
 
Large Scale Automatic Forecasting for Millions of Forecasts
Large Scale Automatic Forecasting for Millions of ForecastsLarge Scale Automatic Forecasting for Millions of Forecasts
Large Scale Automatic Forecasting for Millions of Forecasts
Ajay Ohri
 

What's hot (20)

Exponential Weighting Moving Average.
 Exponential Weighting Moving Average. Exponential Weighting Moving Average.
Exponential Weighting Moving Average.
 
Time series, forecasting, and index numbers
Time series, forecasting, and index numbersTime series, forecasting, and index numbers
Time series, forecasting, and index numbers
 
Adj Exp Smoothing
Adj Exp SmoothingAdj Exp Smoothing
Adj Exp Smoothing
 
Time series
Time seriesTime series
Time series
 
Lesson08_new
Lesson08_newLesson08_new
Lesson08_new
 
Week 4 forecasting - time series - smoothing and decomposition - m.awaluddin.t
Week 4   forecasting - time series - smoothing and decomposition - m.awaluddin.tWeek 4   forecasting - time series - smoothing and decomposition - m.awaluddin.t
Week 4 forecasting - time series - smoothing and decomposition - m.awaluddin.t
 
Demand time series analysis and forecasting
Demand time series analysis and forecastingDemand time series analysis and forecasting
Demand time series analysis and forecasting
 
Moving average method maths ppt
Moving average method maths pptMoving average method maths ppt
Moving average method maths ppt
 
Time series mnr
Time series mnrTime series mnr
Time series mnr
 
Time series analysis- Part 2
Time series analysis- Part 2Time series analysis- Part 2
Time series analysis- Part 2
 
Time series analysis
Time series analysisTime series analysis
Time series analysis
 
Data Science - Part X - Time Series Forecasting
Data Science - Part X - Time Series ForecastingData Science - Part X - Time Series Forecasting
Data Science - Part X - Time Series Forecasting
 
Time series Forecasting
Time series ForecastingTime series Forecasting
Time series Forecasting
 
Trend and Seasonal Components
Trend and Seasonal ComponentsTrend and Seasonal Components
Trend and Seasonal Components
 
Trend and seasonal components/Abshor Marantika/Cindy Aprilia Anggaresta
Trend and seasonal components/Abshor Marantika/Cindy Aprilia AnggarestaTrend and seasonal components/Abshor Marantika/Cindy Aprilia Anggaresta
Trend and seasonal components/Abshor Marantika/Cindy Aprilia Anggaresta
 
Analysis of time series
Analysis of time seriesAnalysis of time series
Analysis of time series
 
Demand forecasting by time series analysis
Demand forecasting by time series analysisDemand forecasting by time series analysis
Demand forecasting by time series analysis
 
Machine Learning - Time Series
Machine Learning - Time Series Machine Learning - Time Series
Machine Learning - Time Series
 
Machine Learning - Time Series Part 2
Machine Learning - Time Series Part 2Machine Learning - Time Series Part 2
Machine Learning - Time Series Part 2
 
Large Scale Automatic Forecasting for Millions of Forecasts
Large Scale Automatic Forecasting for Millions of ForecastsLarge Scale Automatic Forecasting for Millions of Forecasts
Large Scale Automatic Forecasting for Millions of Forecasts
 

Similar to prediction of_inventory_management

Time Series Analysis and Forecasting.ppt
Time Series Analysis and Forecasting.pptTime Series Analysis and Forecasting.ppt
Time Series Analysis and Forecasting.ppt
ssuser220491
 
Time Series Analysis and Forecasting.ppt
Time Series Analysis and Forecasting.pptTime Series Analysis and Forecasting.ppt
Time Series Analysis and Forecasting.ppt
ReylienCastillo1
 
What is the Holt-Winters Forecasting Algorithm and How Can it be Used for Ent...
What is the Holt-Winters Forecasting Algorithm and How Can it be Used for Ent...What is the Holt-Winters Forecasting Algorithm and How Can it be Used for Ent...
What is the Holt-Winters Forecasting Algorithm and How Can it be Used for Ent...
Smarten Augmented Analytics
 
forecasting model
forecasting modelforecasting model
forecasting model
FEG
 
Control charts
Control chartsControl charts
Control charts
Sutha Vincent
 
ARIMA.pptx
ARIMA.pptxARIMA.pptx
7 QC - NEW.ppt
7 QC - NEW.ppt7 QC - NEW.ppt
7 QC - NEW.ppt
AmitGajbhiye9
 
Time Series Anomaly Detection with .net and Azure
Time Series Anomaly Detection with .net and AzureTime Series Anomaly Detection with .net and Azure
Time Series Anomaly Detection with .net and Azure
Marco Parenzan
 
Intro to Forecasting - Part 3 - HRUG
Intro to Forecasting - Part 3 - HRUGIntro to Forecasting - Part 3 - HRUG
Intro to Forecasting - Part 3 - HRUG
egoodwintx
 
Anaplan Stat Forecasting Methods.pdf
Anaplan Stat Forecasting Methods.pdfAnaplan Stat Forecasting Methods.pdf
Anaplan Stat Forecasting Methods.pdf
VishYrdy
 
Demand forecasting
Demand forecastingDemand forecasting
Demand forecasting
PT Education, Indore
 
Time series
Time seriesTime series
Time series
amiyadash
 
Statistical process control
Statistical process controlStatistical process control
Statistical process control
jsembiring
 
Performance OR Capacity #CMGimPACt2016
Performance OR Capacity #CMGimPACt2016 Performance OR Capacity #CMGimPACt2016
Performance OR Capacity #CMGimPACt2016
Alex Gilgur
 
forecast.ppt
forecast.pptforecast.ppt
forecast.ppt
RijuDasgupta
 
Weather forecasting model.pptx
Weather forecasting model.pptxWeather forecasting model.pptx
Weather forecasting model.pptx
VisheshYadav12
 
Forecasting Examples
Forecasting ExamplesForecasting Examples
Forecasting Examples
Muhammad Imran
 
Forecasting time series powerful and simple
Forecasting time series powerful and simpleForecasting time series powerful and simple
Forecasting time series powerful and simple
Ivo Andreev
 
Quality management syllabus
Quality management syllabusQuality management syllabus
Quality management syllabus
selinasimpson1801
 
Enterprise_Planning_TimeSeries_And_Components
Enterprise_Planning_TimeSeries_And_ComponentsEnterprise_Planning_TimeSeries_And_Components
Enterprise_Planning_TimeSeries_And_Components
nanfei
 

Similar to prediction of_inventory_management (20)

Time Series Analysis and Forecasting.ppt
Time Series Analysis and Forecasting.pptTime Series Analysis and Forecasting.ppt
Time Series Analysis and Forecasting.ppt
 
Time Series Analysis and Forecasting.ppt
Time Series Analysis and Forecasting.pptTime Series Analysis and Forecasting.ppt
Time Series Analysis and Forecasting.ppt
 
What is the Holt-Winters Forecasting Algorithm and How Can it be Used for Ent...
What is the Holt-Winters Forecasting Algorithm and How Can it be Used for Ent...What is the Holt-Winters Forecasting Algorithm and How Can it be Used for Ent...
What is the Holt-Winters Forecasting Algorithm and How Can it be Used for Ent...
 
forecasting model
forecasting modelforecasting model
forecasting model
 
Control charts
Control chartsControl charts
Control charts
 
ARIMA.pptx
ARIMA.pptxARIMA.pptx
ARIMA.pptx
 
7 QC - NEW.ppt
7 QC - NEW.ppt7 QC - NEW.ppt
7 QC - NEW.ppt
 
Time Series Anomaly Detection with .net and Azure
Time Series Anomaly Detection with .net and AzureTime Series Anomaly Detection with .net and Azure
Time Series Anomaly Detection with .net and Azure
 
Intro to Forecasting - Part 3 - HRUG
Intro to Forecasting - Part 3 - HRUGIntro to Forecasting - Part 3 - HRUG
Intro to Forecasting - Part 3 - HRUG
 
Anaplan Stat Forecasting Methods.pdf
Anaplan Stat Forecasting Methods.pdfAnaplan Stat Forecasting Methods.pdf
Anaplan Stat Forecasting Methods.pdf
 
Demand forecasting
Demand forecastingDemand forecasting
Demand forecasting
 
Time series
Time seriesTime series
Time series
 
Statistical process control
Statistical process controlStatistical process control
Statistical process control
 
Performance OR Capacity #CMGimPACt2016
Performance OR Capacity #CMGimPACt2016 Performance OR Capacity #CMGimPACt2016
Performance OR Capacity #CMGimPACt2016
 
forecast.ppt
forecast.pptforecast.ppt
forecast.ppt
 
Weather forecasting model.pptx
Weather forecasting model.pptxWeather forecasting model.pptx
Weather forecasting model.pptx
 
Forecasting Examples
Forecasting ExamplesForecasting Examples
Forecasting Examples
 
Forecasting time series powerful and simple
Forecasting time series powerful and simpleForecasting time series powerful and simple
Forecasting time series powerful and simple
 
Quality management syllabus
Quality management syllabusQuality management syllabus
Quality management syllabus
 
Enterprise_Planning_TimeSeries_And_Components
Enterprise_Planning_TimeSeries_And_ComponentsEnterprise_Planning_TimeSeries_And_Components
Enterprise_Planning_TimeSeries_And_Components
 

More from FEG

Sequence Model pytorch at colab with gpu.pdf
Sequence Model pytorch at colab with gpu.pdfSequence Model pytorch at colab with gpu.pdf
Sequence Model pytorch at colab with gpu.pdf
FEG
 
學院碩士班_非監督式學習_使用Orange3直接使用_分群_20240417.pdf
學院碩士班_非監督式學習_使用Orange3直接使用_分群_20240417.pdf學院碩士班_非監督式學習_使用Orange3直接使用_分群_20240417.pdf
學院碩士班_非監督式學習_使用Orange3直接使用_分群_20240417.pdf
FEG
 
資料視覺化_透過Orange3進行_無須寫程式直接使用_碩士學程_202403.pdf
資料視覺化_透過Orange3進行_無須寫程式直接使用_碩士學程_202403.pdf資料視覺化_透過Orange3進行_無須寫程式直接使用_碩士學程_202403.pdf
資料視覺化_透過Orange3進行_無須寫程式直接使用_碩士學程_202403.pdf
FEG
 
Pytorch cnn netowork introduction 20240318
Pytorch cnn netowork introduction 20240318Pytorch cnn netowork introduction 20240318
Pytorch cnn netowork introduction 20240318
FEG
 
2023 Decision Tree analysis in business practices
2023 Decision Tree analysis in business practices2023 Decision Tree analysis in business practices
2023 Decision Tree analysis in business practices
FEG
 
2023 Clustering analysis using Python from scratch
2023 Clustering analysis using Python from scratch2023 Clustering analysis using Python from scratch
2023 Clustering analysis using Python from scratch
FEG
 
2023 Data visualization using Python from scratch
2023 Data visualization using Python from scratch2023 Data visualization using Python from scratch
2023 Data visualization using Python from scratch
FEG
 
2023 Supervised Learning for Orange3 from scratch
2023 Supervised Learning for Orange3 from scratch2023 Supervised Learning for Orange3 from scratch
2023 Supervised Learning for Orange3 from scratch
FEG
 
2023 Supervised_Learning_Association_Rules
2023 Supervised_Learning_Association_Rules2023 Supervised_Learning_Association_Rules
2023 Supervised_Learning_Association_Rules
FEG
 
202312 Exploration Data Analysis Visualization (English version)
202312 Exploration Data Analysis Visualization (English version)202312 Exploration Data Analysis Visualization (English version)
202312 Exploration Data Analysis Visualization (English version)
FEG
 
202312 Exploration of Data Analysis Visualization
202312 Exploration of Data Analysis Visualization202312 Exploration of Data Analysis Visualization
202312 Exploration of Data Analysis Visualization
FEG
 
Transfer Learning (20230516)
Transfer Learning (20230516)Transfer Learning (20230516)
Transfer Learning (20230516)
FEG
 
Image Classification (20230411)
Image Classification (20230411)Image Classification (20230411)
Image Classification (20230411)
FEG
 
Google CoLab (20230321)
Google CoLab (20230321)Google CoLab (20230321)
Google CoLab (20230321)
FEG
 
Supervised Learning
Supervised LearningSupervised Learning
Supervised Learning
FEG
 
UnSupervised Learning Clustering
UnSupervised Learning ClusteringUnSupervised Learning Clustering
UnSupervised Learning Clustering
FEG
 
Data Visualization in Excel
Data Visualization in ExcelData Visualization in Excel
Data Visualization in Excel
FEG
 
6_Association_rule_碩士班第六次.pdf
6_Association_rule_碩士班第六次.pdf6_Association_rule_碩士班第六次.pdf
6_Association_rule_碩士班第六次.pdf
FEG
 
5_Neural_network_碩士班第五次.pdf
5_Neural_network_碩士班第五次.pdf5_Neural_network_碩士班第五次.pdf
5_Neural_network_碩士班第五次.pdf
FEG
 
4_Regression_analysis.pdf
4_Regression_analysis.pdf4_Regression_analysis.pdf
4_Regression_analysis.pdf
FEG
 

More from FEG (20)

Sequence Model pytorch at colab with gpu.pdf
Sequence Model pytorch at colab with gpu.pdfSequence Model pytorch at colab with gpu.pdf
Sequence Model pytorch at colab with gpu.pdf
 
學院碩士班_非監督式學習_使用Orange3直接使用_分群_20240417.pdf
學院碩士班_非監督式學習_使用Orange3直接使用_分群_20240417.pdf學院碩士班_非監督式學習_使用Orange3直接使用_分群_20240417.pdf
學院碩士班_非監督式學習_使用Orange3直接使用_分群_20240417.pdf
 
資料視覺化_透過Orange3進行_無須寫程式直接使用_碩士學程_202403.pdf
資料視覺化_透過Orange3進行_無須寫程式直接使用_碩士學程_202403.pdf資料視覺化_透過Orange3進行_無須寫程式直接使用_碩士學程_202403.pdf
資料視覺化_透過Orange3進行_無須寫程式直接使用_碩士學程_202403.pdf
 
Pytorch cnn netowork introduction 20240318
Pytorch cnn netowork introduction 20240318Pytorch cnn netowork introduction 20240318
Pytorch cnn netowork introduction 20240318
 
2023 Decision Tree analysis in business practices
2023 Decision Tree analysis in business practices2023 Decision Tree analysis in business practices
2023 Decision Tree analysis in business practices
 
2023 Clustering analysis using Python from scratch
2023 Clustering analysis using Python from scratch2023 Clustering analysis using Python from scratch
2023 Clustering analysis using Python from scratch
 
2023 Data visualization using Python from scratch
2023 Data visualization using Python from scratch2023 Data visualization using Python from scratch
2023 Data visualization using Python from scratch
 
2023 Supervised Learning for Orange3 from scratch
2023 Supervised Learning for Orange3 from scratch2023 Supervised Learning for Orange3 from scratch
2023 Supervised Learning for Orange3 from scratch
 
2023 Supervised_Learning_Association_Rules
2023 Supervised_Learning_Association_Rules2023 Supervised_Learning_Association_Rules
2023 Supervised_Learning_Association_Rules
 
202312 Exploration Data Analysis Visualization (English version)
202312 Exploration Data Analysis Visualization (English version)202312 Exploration Data Analysis Visualization (English version)
202312 Exploration Data Analysis Visualization (English version)
 
202312 Exploration of Data Analysis Visualization
202312 Exploration of Data Analysis Visualization202312 Exploration of Data Analysis Visualization
202312 Exploration of Data Analysis Visualization
 
Transfer Learning (20230516)
Transfer Learning (20230516)Transfer Learning (20230516)
Transfer Learning (20230516)
 
Image Classification (20230411)
Image Classification (20230411)Image Classification (20230411)
Image Classification (20230411)
 
Google CoLab (20230321)
Google CoLab (20230321)Google CoLab (20230321)
Google CoLab (20230321)
 
Supervised Learning
Supervised LearningSupervised Learning
Supervised Learning
 
UnSupervised Learning Clustering
UnSupervised Learning ClusteringUnSupervised Learning Clustering
UnSupervised Learning Clustering
 
Data Visualization in Excel
Data Visualization in ExcelData Visualization in Excel
Data Visualization in Excel
 
6_Association_rule_碩士班第六次.pdf
6_Association_rule_碩士班第六次.pdf6_Association_rule_碩士班第六次.pdf
6_Association_rule_碩士班第六次.pdf
 
5_Neural_network_碩士班第五次.pdf
5_Neural_network_碩士班第五次.pdf5_Neural_network_碩士班第五次.pdf
5_Neural_network_碩士班第五次.pdf
 
4_Regression_analysis.pdf
4_Regression_analysis.pdf4_Regression_analysis.pdf
4_Regression_analysis.pdf
 

Recently uploaded

Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
IndexBug
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 

Recently uploaded (20)

Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 

prediction of_inventory_management

  • 2. About me • Education • NCU (MIS)、NCCU (CS) • Work Experience • Telecom big data Innovation • AI projects • Retail marketing technology • User Group • TW Spark User Group • TW Hadoop User Group • Taiwan Data Engineer Association Director • Research • Big Data/ ML/ AIOT/ AI Columnist 2 「How can you not get romantic about baseball ? 」
  • 3. Tutorial Content 3 Stationary of Time-Series Forecasting with Seasonal or Periodic data Homework An accurate inventory prediction
  • 4. Code • Download code • https://github.com/orozcohsu/ntunhs_2020/tree/master/alg_20210527 4
  • 5. An accurate inventory prediction 5
  • 6. An accurate inventory prediction 6 The blocks of Inventory Management System
  • 7. An accurate inventory prediction • Inventory forecasting, also known as demand planning, is the practice of using past data, trends and known upcoming events to predict needed inventory levels for a future period. • An accurate forecasting ensures businesses have enough product to fulfill customer orders and do not spend too little or too much on inventory. 7
  • 8. An accurate inventory prediction • Data elements required for a success inventory forecasting include • Current Inventory Levels • OUTSTANDING purchase orders • HISTORICAL TRENDLINES • Forecasting period requirements • Expected demand and SEASONALITY • MAXIMUM possible stock levels • Sales trends and velocity 8
  • 9. Accurate inventory prediction 9 01 Future forecast period 02 Base demand 03 Variables and trends 04 Build model 05 Model tuning
  • 10. Accurate inventory prediction • Demand Factors (Base, trends, seasonality, qualitative…) • An example of other demand factors that can impact or inflate your normal base demand. 10
  • 11. Accurate inventory prediction • Demand types • Demand of Product X, Y, Z varies considerably. • Some will have consistently high demand over time, for others there could be sporadic or low demand. 11 Quiz: What is the importance of demand forecasting? Hint: Watch the video from https://youtu.be/DKJfForHw-w What is demand forecasting?
  • 13. Stationary of Time-Series • Introduction to Stationarity • Stationarity is one of the most important concepts you will come across when working with time series data. A stationary series is one in which the properties – mean, variance and covariance, do not vary with time. (a) The mean varies (increases) with time which results in an upward trend (b) We do not see a trend in the series. A stationary series must have a constant variance (c) The spread becomes closer as the time increases, which implies that the covariance is a function of time. 13 (a) (b) (c)
  • 14. Stationary of Time-Series • Stationary • The mean, variance and covariance are constant with time. • Most statistical models require the series to be stationary to make effective and precise predictions. • A stationary time series is the one for which the properties (namely mean, variance and covariance) do not depend on time. 14
  • 15. Stationary of Time-Series • How to check the series is stationary? • Use the ADF (Augmented Dickey Fuller) Test • It helps us understand if the series is stationary or not • Null hypothesis: The series has a unit root • Alternate hypothesis: The series has no unit root. check_stationary.ipynb 15 Null and Alternative Hypotheses https://opentextbc.ca/introstatopenstax/chapter/null-and-alternative-hypotheses/
  • 16. Stationary of Time-Series • How to make our series to stationary: Differencing • Compute the difference of consecutive terms in the series. • Differencing is typically performed to get rid of the varying mean. • How to make our series to stationary: Seasonal Differencing • Calculate the difference between an observation and a previous observation from the same season. 16
  • 17. Stationary of Time-Series • Time series data are expected to contain some white noise component on top of the signal generated by the underlying process. • When forecast ERRORS (y hat and y) are white noise, it means that all of the signal information in the time series has been harnessed by the model in order to make predictions. y(t) = signal(t) + noise(t) 17 White noise: A time series is white noise if the variables are random and identically distributed with a mean of zero, autocorrelation is closer to 0.
  • 18. Stationary of Time-Series • How to make our series to stationary: Transformation • Used to stabilize the non-constant variance of a series. • Common transformation methods include power transform, square root, and log transform. • Check Durbin_Watson, ACF, Ljung box test of series after we process our series. making_a_time_series_stationary.ipynb 18
  • 19. Stationary of Time-Series 19 Start Random Stationary Non- Stationary White noise (no pattern) terminated Stationary (original series is stationary) Differencing stationary ARIMA model (Autoregressive Integrated Moving Average model) ARMA model (Autoregressive moving average model) Yes No No Differencing Yes
  • 20. Forecasting with Seasonal or Periodic data 20
  • 21. Forecasting with Seasonal or Periodic data • Some useful tools • Moving average forecasting (MA) • Simple Exponential Smoothing forecasting(SES; holtwinters) • Stepwise Autoregressive forecasting • Autoregressive Integrated Moving Average model forecasting (ARIMA) • A seasonal autoregressive integrated moving average (SARIMA) • Autoregressive conditional heteroskedasticity forecasting (ARCH) • Hidden Markov Model forecasting (HMM) 21
  • 22. Forecasting with Seasonal or Periodic data • A time series analysis focuses on a series of data points ordered in time. • If you’re a retailer, a time series analysis can help you forecast daily sales volumes to guide decisions around inventory and better timing for marketing efforts. • If you’re in the financial industry, a time series analysis can allow you to forecast stock prices for more effective investment decisions. • If you’re an agricultural company, a time series analysis can be used for weather forecasting to guide planning decisions around planting and harvesting. 22
  • 23. Forecasting with Seasonal or Periodic data • Check any time series data for patterns that can affect the results, and can inform which forecasting model to use. 23 Type Description Irregular Fluctuation No pattern Trend Increases, decreases, or stays the same over time Seasonal or Periodic Pattern repeats periodically over time Cyclical Pattern that increases and decreases but usually related to non- seasonal activity, like business cycles Level The average of value
  • 24. Forecasting with Seasonal or Periodic data 24
  • 25. Forecasting with Seasonal or Periodic data • Use my code and present those models 25 time_series_forecasting.ipynb
  • 26. Forecasting with Seasonal or Periodic data • Parameters: Additive model • Usually represents a linear time series with fixed fluctuations and a fixed period pattern. • y(t) = Level + Trend + Seasonality + Cyclical/Noise/Random • Parameters: Multiplicative model • The fluctuations and cycles of the time series will change with time. It is a non-linear time series, and most of the time series data of stocks fall into this category. • y(t) = Level * Trend * Seasonality * Cyclical/Noise/Random 26 We will use it for seasonal_decompose, check my code
  • 27. Forecasting with Seasonal or Periodic data • Simple Exponential Smoothing (SES) • Suitable for time series data without trend or seasonal components. • This model is using weighted averages of past observations to forecast new values. • Parameters: • Determine the smoothing level α: Between 0 and 1 (Level equation) • When α = 0, the forecasts are equal to the average of the historical data. • When α = 1, the forecasts will be equal to the value of the last observation. • Write the model RMSE in P33 table 27
  • 28. Forecasting with Seasonal or Periodic data • Holts Linear Trend Method • Suitable for time series data with a trend component but without a seasonal component. • Expanding the SES method, the Holt method helps you forecast time series data that HAS a trend. • Parameters: • Level smoothing parameter α: Between 0 and 1 (Level equation) • Trend smoothing parameter β*: Between 0 and 1 (Trend equation) • Write the model RMSE in P33 table 28
  • 29. Forecasting with Seasonal or Periodic data • Holt-Winters Seasonal Method • Suitable for time series data with trend and/or seasonal components. • Parameters: • Seasonality smoothing parameter: γ • Two general types of seasonality: Additive and Multiplicative (Check Page 26) • Identify the frequency of seasonality m: m=4 (Quarterly seasonal pattern) m=12 (Yearly seasonal pattern) • Box-Cox transformations for data normalization 29 https://www.statisticshowto.com/box-cox-transformation https://www.statsmodels.org/dev/generated/statsmodels.tsa.holtwinter s.ExponentialSmoothing.fit.html Homework2: Set use_boxcox to False, log, float to compare the result.
  • 30. Forecasting with Seasonal or Periodic data • SARIMA (Seasonal autoregressive integrated moving average) • Suitable for time series data with trend and/or seasonal components • ARIMA model looks at autocorrelations or serial correlations in the data, and it looks at differences between values in the time series. • SARIMA builds upon the concept of ARIMA but extends it to model the seasonal elements in your data. • Parameters (we need to find those SEVEN parameters): • Trend elements: • p: Trend autoregression order • d: Trend difference order • q: Trend moving average order 30 • Seasonal elements: • P: Seasonal autoregression order • D: Seasonal difference order • Q: Seasonal moving average order • m: The number of time steps for a single seasonal period
  • 31. Forecasting with Seasonal or Periodic data • Grid search • A python package. • It is a tuning technique that attempts to compute the optimum values of hyperparameters. • Find out the best value of (p, d, q, P, D, Q, m) • Evaluation metric • AIC (Akaike Information Criterion) • The AIC measures how well a model fits the data while taking into account the overall complexity of the model. • Pick the combination with the LOWEST AIC value. 31
  • 32. Forecasting with Seasonal or Periodic data 32 Check model’s residuals are near normally distributed. This indicates we have found a WELL-FIT model suitable for our dataset. Symmetry KDE line follow closely with N(0,1) N(0,1) => mean =0, variance =1 If residuals are normally distributed, the points will fall on the 45-degree https://desktop.arcgis.com/en/arcmap/10.3/guide- books/extensions/geostatistical-analyst/normal-qq-plot-and- general-qq-plot.htm Residuals have a low autocorrelation with the lagged versions of itself, the majority of dots fall into the blue shaded area
  • 33. Forecasting with Seasonal or Periodic data 33 Algorithm RMSE Simple Exponential Smoothing 108.63 Holts Linear Trend Method 305.25 Holt-Winters Seasonal Method (multiplicative) 25.78 SARIMA (dynamic=False) 17.9 Homework3: Try to use Holt-Winters Seasonal Method to predict future sales value
  • 34. Forecasting with Seasonal or Periodic data 34 Prediction: 1961-01-01 -> 1965-04-01
  • 36. Homework • Continue to use square root or power transformation on Making_a_Time_Series_Stationary.ipynb series and compare with better results. • Set use_boxcox to False, log, float to compare the result. • Try to use Holt-Winters Seasonal Method to predict future sales value 36