understand Time series forecasting with different models in python, and fine tune the hyper-parameters to get the least possible error.
- In the first part: understand Time series forecasting with ARIMA model in python, and fine tune the hyper-parameters to get the least possible error.
- In the second part: Apply CNN from scratch to the same dataset.
- Apply Facebook prophet to the same dataset.
A. Time Series is a series of observations taken at specified time intervals usually equal intervals.
-
a) The dependant variable(y) (that is supposed to vary with time) is constant.
Eq: y=f(x)=4, a line parallel to x-axis(time) will always remain the same. - b) The dependant variable(y) represent values that can be denoted as a mathematical function.
Eq: sin(x), log(x), Polynomials etc. Thus, we can directly get value at some time using the function itself. No need of forecasting.
- a) Trend - Upward & downward movement of the data with time over a large period of time. Eq: Appreciation of Dollar vs rupee.
- b) Seasonality - seasonal variances. Eq: Ice cream sales increases in Summer only
- c) Noise or Irregularity - Spikes & troughs at random intervals
- d) Cyclicity - behavior that repeats itself after large interval of time, like months, years etc.
- a) If a TS has a particular behavior over a time interval, then there's a high probability that over a different interval, it will have same behavior, provided TS is stationary. This helps in forecasting accurately.
- b) Theories & Mathematical formulas ae more mature & easier to apply for as TS which is stationary.
- a) Rolling Statistics - Plot the moving avg or moving standard deviation to see if it varies with time. Its a visual technique.
- b) ADCF Test - Augmented Dickey–Fuller test is used to gives us various values that can help in identifying stationarity. The Null hypothesis says that a TS is non-stationary. It comprises of a Test Statistics & some critical values for some confidence levels. If the Test statistics is less than the critical values, we can reject the null hypothesis & say that the series is stationary. THE ADCF test also gives us a p-value. Acc to the null hypothesis, lower values of p is better.