# Conditional Temporal Aggregation for Time Series Forecasting Using Feature-Based Meta-Learning
## 1 Introduction
Effectively, the proposed classifier serves as a meta-learner that directly links time series features with post-sample forecasting performance. Such feature-based meta-learners have been successfully employed in the literature to combine the forecasts of multiple models ([PERSON] et al., 2018) or predict their performance ([PERSON] et al., 2018), but not in temporal aggregation settings. We focus on a variant of classification trees, called LightGBM ([PERSON] et al., 2018), that exploits the power of gradient boosting and has shown excellent performance in similar tasks ([PERSON] et al., 2018), including time series forecasting ([PERSON] et al., 2018). Gradient-boosted trees are preferred over other classification models as they selectively capture nonlinear relationships across the explanatory variables (features) used for prediction, are faster to compute, have more reasonable memory requirements, are simpler to optimize in terms of hyperparameters, require less data to be sufficiently trained (e.g., compared to neural networks), and are widely used in the literature for developing meta-learners that are tasked to select or to combine forecasts from a pool of alternatives ([PERSON] et al., 2018; [PERSON] et al., 2018). The contributions of this paper are threefold:  
* We propose a nonlinear approach for employing (multiple) temporal aggregation and deciding either on the selection of the most suitable aggregation level for producing forecasts or on the weights to be used for combining the base forecasts of multiple levels. Compared to existing alternatives, this method is more general, relying neither on heuristic rules ([PERSON] et al., 2018; [PERSON] et al., 2018) nor on pre-defined weights ([PERSON] et al., 2018; [PERSON] et al., 2018). * In order to analyze the complex data relationships between forecasting accuracy and time series features, we consider an ML process that involves the preparation of the data (estimation of time series features and conduction of forecasting simulations), the tuning of the meta-learner in terms of hyperparameters, and its training. * We suggest that once the meta-learner has been trained, it can directly be used to derive the combination weights of the base forecasts for any time series at hand in a robust and fast fashion using the features of said series as input. Note that the proposed classification model is explicitly trained with the objective of producing results that minimize the forecast error, as defined by the forecaster. Moreimportantly, training is performed by assessing the post-sample accuracy of each forecast being combined, measured through validation. Therefore, the suggestions of the meta-learner are expected to be more representative and better match the objectives of the forecasting task at hand. In addition, given that the classifier learns from multiple time series simultaneously (cross-learning), the meta-learner generalizes better, thus avoiding biases that may occur when the forecast errors computed for deriving the combination weights are estimated for each series separately. Moreover, its results are directly linked with the characteristics of the examined series, facilitating their interpretation. We benchmark the performance of the meta-learner against standard methods used for applying (multiple) temporal aggregation considering two large data sets that contain both fast- and slow-moving series. The benchmarks include conventional forecasting (no temporal aggregation is applied), an equally weighted combination of base forecasts [10], forecasting with temporal hierarchies [13], as well as popular time series forecasting methods that have achieved good performance in well-known forecasting competitions. The results, which include tests for significance, suggest that the proposed approach can improve forecasting accuracy, especially for the case of the fast-moving data. These improvements reach 4% when compared to conventional forecasting and about 6% when compared to popular time series forecasting methods used in the field.