## 2 Background: Data and Autoregressive Models  
### Time Series Data: Forecasting  
Time is the central characteristic that distinguishes time series from other types of data. This property of theirs is both a limitation and a structural element of the data collection, as well as a source of additional information for their analysis [6]. Essentially, time series data is any type of information presented as an ordered sequence and can be defined as a collection of observations of some variable, organized into equally spaced time intervals [7].  
The question of forecasting is one of the most difficult and essential problems that time series analysis must deal with. The performance and accuracy of the analysis results vary depending on the type of data and its assumptions. In addition to these parameters, the analysis is also affected by factors inherent to the respective field of research, such as the periodicity of the time series, unforeseen events, changes in the structure of the organizations or structures from which the data are collected, etc. [8]. The \"No-Free-Lunch\" theorem proves that it is not possible to have a forecasting method that gives optimal performance for all possible time series [9]. There is a significant amount of research literature on predictive models, and the results of these studies indicate the existence of two macro-categories of methods: statistical methods and machine learning methods. In the continuation of our paper, we will refer to the following categories of time series forecasting models: (a) statistical models, (b) machine and deep learning and (c) hybrid models [10].  
The comparison of the forecasting results of the aforementioned models in the context of the studies presented in the present work is based on various metrics, figure of merits,whose mathematical formulas are expressed below, where \(y_{t}\) is the real value of the series at the time point t, \(\hat{y_{t}}\) is the corresponding forecasted value given by the model, and N is the time period of the forecast:  
Mean Squared Error (MSE)  
\[MSE=\frac{1}{N}{\sum_{t=1}^{N}(y_{t}-\hat{y_{t}})^{2}}. \tag{1}\]  
The popular error metric RMSE is used in the scientific literature in place of MSE (same scale of the variable), and it is the square root of the MSE metric.  
Mean Absolute Percentage Error (MAPE)  
\[MAPE=\frac{1}{N}\sum_{t=1}^{N}|\frac{y_{t}-\hat{y_{t}}}{y_{t}}|. \tag{2}\]  
=Mean Absolute Error (MAE)  
\[MAE=\frac{1}{N}\sum_{t=1}^{N}|y_{t}-\hat{y_{t}}|. \tag{3}\]  
Coefficient of determination (\(R^{2}\))  
It is a statistical measure to indicate the proportion of the dependent variable variation in a model that can be predicted from the variation in the independent model variables, and it is a metric used to determine how well our model fits a set of observations.  
Mean Absolute Deviation (MAD)  
\[MAD=\frac{1}{N}{\sum_{t=1}^{N}|(y_{t}-m(Y)|}, \tag{4}\]  
where \(m(X)\) is the mean value of the forecasted values for the specific time range.  
Nash-Sutcliffe model efficiency coefficient (NSE)  
It is a metric used to assess the predictive capacity of hydrological models. It is computed using the following mathematical formula:  
\[NSE=1-\frac{\sum_{t=1}^{N}(Y_{o}^{t}-Y_{m}^{t})^{2}}{\sum_{t=1}^{N}(Y_{o}^{t}- \bar{Y_{o}})^{2}}, \tag{5}\]  
where \(\bar{Y_{o}}\) is the mean of observed discharges, \(Y_{m}\) is the modeled discharge and \(Y_{o}^{t}\) is the observed discharge at time \(t\).  
Kolmogorov-Smirnov test (K-S distance)  
The Kolmogorov-Smirnov test quantifies a distance metric between the distribution of our model outputs and a reference distribution defined by the null hypothesis of our study. Normalized Mean Absolute Error (NMAE)  
This metric is used specifically in the energy forecasting domain, being able to generalize under different upper bounding conditions.  
\[NMAE(\%)=\frac{1}{N}\sum_{t=1}^{N}\frac{|y_{t}-\hat{y_{t}}|}{C}\times 100, \tag{6}\]  
where C is the capacity of the power plant.