# Time-Series Forecasting of Seasonal Data Using Machine Learning Methods
## 5 Conclusions  
The article considers various methods of forecasting time series with seasonality. Classical and newer approaches based on machine learning algorithms and neural networks, as well as statistical models, are presented. A test of prediction accuracy using statistical metrics was performed for each of the considered methods. The authors proposed an approach that allows using small historical data samples (less than 21 days) to build a short-term forecast (nearest 48 h). It reduces the load on computing resources and maintains the accuracy of the estimates. It is crucial when implementing predictive systems based on embedded devices that implement real-time automatic control. The model must be retrained once a day to achieve the goal, considering the newly received data. Thus, the criterion responsible for the time for collecting data, training the model, and obtaining a forecast plays a decisive role in choosing a model. The best method, according to a set of attributes, turned out to be the XGBoost method. Nevertheless, optimizing algorithms to search model parameters can bring other algorithms, such as LSTM, to the forefront. Further research will be devoted to the optimization of model learning. A new approach for the hyperparameters finding procedure and a new algorithm for the optimal data length calculation should be developed. The existing methods will be extended for the using of \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Model** & **R2** & **MSE** & **RMSE** & **MAE** & **MAPE** & **T.Time** & **P.Time** \\ \hline SARIMA & 0.961 & 0.076 & 0.276 & 0.198 & 0.035 & 1298.060 & 0.020 \\ Holt-Winters ES & 0.921 & 0.156 & 0.396 & 0.324 & 0.059 & 0.049 & 0.001 \\ ETS & 0.945 & 0.109 & 0.329 & 0.254 & 0.043 & 0.285 & 0.001 \\ Prophet & 0.918 & 0.162 & 0.402 & 0.331 & 0.062 & 0.881 & 0.754 \\ XGBoost (real test data) & 0.975 & 0.050 & 0.224 & 0.163 & 0.029 & 7.505 & 0.005 \\ XGBoost (synthetic test data) & 0.954 & 0.091 & 0.301 & 0.228 & 0.043 & 7.505 & 0.235 \\ LSTM (real test data) & 0.960 & 0.080 & 0.282 & 0.218 & 0.041 & 39.505 & 0.361 \\ LSTM (synthetic test data) & 0.907 & 0.184 & 0.429 & 0.322 & 0.063 & 39.505 & 3.185 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Statistical and performance time analysis. the recommended systems and robust optimal control real-time systems. The participation of the operator in setting up the algorithms should be minimized. Conceptualization, V.K. and V.A. ; methodology, V.K. ; software, V.A. ; formal analysis, V.K. ; investigation, V.K. and V.A. ; writing--original draft preparation, V.A. ; writing--review and editing, V.K. ; visualization, V.A. ; supervision, V.K. ; All authors have read and agreed to the published version of the manuscript. This research received no external funding. Not applicable. The code and data presented in this study available on GitHub \"[[https://github.com/vasoftlab/algorithms-2263871](https://github.com/vasoftlab/algorithms-2263871)]([https://github.com/vasoftlab/algorithms-2263871](https://github.com/vasoftlab/algorithms-2263871)) (accessed on 8 May 2023)\". All details can be provided upon request from the corresponding author. The authors declare no conflict of interest. The following abbreviations are used in this manuscript:  
ADfuller Augmented Dickey-Fuller  
ANN Artificial Neural Network  
ARIMA Autoregressive integrated moving average  
DB Data base  
ETS Exponential smoothing  
LSTM Long short-term memory  
MAE Mean absolute error  
MAPE Mean absolute percentage error  
MSE Mean squared error  
OPC Open Platform Communications  
P.Time Prediction time  
R2 Correlation coefficient  
RMSE Root mean squared error  
RNN Recurrent neural network  
SARIMA Seasonal autoregressive integrated moving average  
T.Time Training time
Figure A2: Prediction result with Holt-Winters Exponential Smoothing model and actual values from the test dataset. Figure A3: Prediction result with ETS model and actual values from the test dataset.