2.1 Dataset
Python programming is used for carrying out detailed data analysis on the dataset. We have used our proprietary data which is available at Kaggle for reference [4] This dataset holds day-wise time series data with two columns namely, “ds” representing the date and “y” which denotes the sales values. The sales value ranges from 0 to 10 with 402 zeros out of 1094 records (3 years)
2.2 Background
Traditional models like ARIMA and Prophet are used but have not been met with success. To alleviate this problem, we customized and tweaked various methods which led to the development of the FeRM model.
ARIMA - An autoregressive integrated moving average is a statistical analysis model that uses time series data to better understand the data set and predict future trends. The rule of thumb for ARIMA is that at least 50 data points are required but preferably more than 100 observations. This is the downside for our use case because we lag in terms of the number of data points. Hanke and Wichern [1] recommends a minimum of 2xs to 6xs depending on the method, where s is the seasonal period, so s = 12 for monthly data. 50 data points would be 50/12 = 4 years of data. However, it also depends on the regularity of data, if the seasonal pattern is regular, 3 years of data would be sufficient.
Auto ARIMA is used to find the best model parameters by performing a stepwise search. Python is extensively used to organize and interpret the data for further research analysis. The predicted values of the Auto ARIMA model using our two-year data were confined to a narrow range (1.3, 1.35) which when converted to a whole number is one throughout the year. Refer the Fig. 3 below.
Prophet - algorithm [2] detects the trend and seasonality from the data first, then combine them all together to get the forecasted values considering the Overall Trend, Seasonality and Holiday Effect. Time Series Forecasting has become drastically easier because of the Prophet model as it works without setting any parameters explicitly. It tries to fit additive regression models – ‘curve fitting’. The predicted values of the prophet model using our two-year data were confined to a narrow range (2.0, 3.0) as shown in the Fig. 4 below.
The major problem we faced with these models is that the predicted value range tends to be closer, and the trends were simplistic and weak which leads to the conclusion that the situation is stable, and the predicted values are 1 for all the dates throughout the year (Considering the Auto Arima forecasting). To produce a list of nearly identical sequences is trivially maximized by the FeRM model which forecasts the value by considering the trends and thus the value range is comparatively wider.
2.3 Evaluation Metrics
We used Mean Squared Error (MSE), Mean Absolute Error (MAE) and Root Mean Squared Error (RMSE) with reference to [5] as key performance metrics indicators to compare the models.
MSE measures the average of the squares of the errors — that is, the average squared difference between the estimated values and what is estimated. An ideal MSE value is 0.0, which means that all predicted values matched the expected values exactly. When a model has no error, the MSE equals zero. As model error increases the MSE value increases. MSE is most useful when the dataset contains unexpected values. MSE is scale-dependent, i.e., dependent on the dependent variable.
MSE formula = (1/n) * Σ (actual – forecast)2
where:
n = number of items,
Σ = summation notation,
Actual = original or observed y-value,
Forecast = y-value from regression.
MAE calculates the average difference between the calculated values and actual values. It calculates errors between actual values and values predicted by the model.
MAE = True values – Predicted values
MAE takes the average of this error from every sample in a dataset and gives the output (each error influences MAE in direct proportion to the absolute value of the error)
Root mean squared error (RMSE) measures the average magnitude of the error. It is the square root of the mean of the square of all of the error. The formula for calculating RMSE: √MSE