Home » Forecasting in R with code
Category Archives: Forecasting in R with code
Today we will talk about Forecasting algorithms. Before we dig deep into the topic, let’s understand why do we actually need forecasting?
Forecasting is the process of predicting the future by looking at the previous pattern(historic data). In the back of the mind, a businessman knows when to boost the storage and when to play safe. Everyone has used forecasting sometime or the other.
Remember when you use to gauge through past year question papers and you used to predict the chapters which will dominate in the coming exam. It’s also forecasting.
Let’s talk about different terminologies in forecasting:-
1. Stationarity – Before you use any forecasting model, you must make the data stationary. A stationary time series is one whose statistical properties such as mean, variance, autocorrelation, etc. are all constant over time.
Seasonality, cyclicity and trend – Look at the below graph, Trend is like the overall movement of the data. Here the trend is slightly increasing over time.
Seasonality – A definite hiccup or dig which follows a pattern is called seasonality. Here we have 12 seasonal values, where first there is an increase and then a decrease in values
Cyclicity – It’s almost equivalent to seasonality but it looks at seasonality on a longer time period. There is clearly a cyclic pattern in every 4 time period
Now we have the following data – Month number and number of buckets of KFC being sold in one of the outlet in India.
Schema – MonthStartDate and BucketVolume