## Materials and Methods
### Methods
#### 3.4.2 The Stacking Ensemble Learning Method (SELM)  
The ensemble method is one of the most successful approaches for performing time series forecasting tasks [36; 37]. It refers to a method that combines multiple predictive learning algorithms to obtain results superior to those that could be obtained from a single algorithm. For instance, in a real-world application, it is not easy to generalize a given dataset because it has numerous underlying patterns and features. Although a particular model might be able to capture certain patterns or features, other models may not be able to achieve this. Likewise, different models capture the different patterns and features of the dataset. If multiple models learn patterns from the dataset and if their predictions are appropriately combined, it is possible to obtain more accurate results than a single model would be able to produce. [PERSON] et al. [38] present a clear explanation as to why ensemble methods are effective. The first reason is statistical. When the training dataset is too small, a situation that arises after clustering, a learning algorithm can typically identify several models in the hypothesis space that show the same performance with respect to the training data. If the models are not correlated, averaging them reduces the risk of choosing the wrong hypothesis. The second reason is computational. Many machine learning algorithms, such as ANNs, present a risk of falling into local optima. Therefore, the algorithms are greatly affected by the initialization of the weights. Ensemble methods mitigate this problem by taking multiple models built from many different starting points resulting in an improved approximation of the true function. The last reason is representational. In most cases, because the training dataset has a finite size, the true function cannot be completely represented by any models in the hypothesis space. By combining several models, it may be possible to expand the representable function space to obtain a more effective model for the true function. The most commonly used ensemble methods are the following:  
* bootstrap aggregating (bagging);
* boosting;
* stacking. Bagging creates several training subsets. This is achieved by sampling same-sized subsets from the training dataset and then by training models with different subsets and aggregating the results, which have a parallel learning shape [39]. Popular bagging algorithms are bagging meta-estimators, which follow the general bagging rules that are briefly explained above, and RFs, which are extensions of bagging estimator algorithms. Decision trees are usually used as the base estimators, and, unlike bagging meta-estimators, RFs randomly choose a set of features that are used to determine the best split at each node of the decision tree [40]. Boosting is, unlike bagging, a sequential learning technique. The basic concept of boosting is that new models are improved by weighting the training points that the previous model was unable to predict correctly. That is, the first subset is created from the original dataset, and the base model is then trained by assigning the same weights to all training points. Next, errors are calculated, and weak areas that produce inaccurate predictions are identified. Subsequently, a new model is trained using the modified training set, to assign more weight to the weak areas. Boosting has been shown to improve the performance compared to bagging, but it can over fit the training data. The most common boosting algorithm is adaptive boosting (ADB) [41]. Other boosting-based methods include the gradient boosting machine (GBM) [42] and extreme gradient boosting (XGB) [43]. The basic concept of the SELM is that \"multiple heads are better than one.\" It is an ensemble technique that uses an aggregating model that learns the way in which the best combination of predictions can be made by multiple models or that simply averages them [30]. Figure 3 showsa conceptual structure of the SELM.