scieee AI-readable full text Open interactive document viewer

Short-term prediction of consumption and production of energy

Petkovová, Ludmila; Hartman, David; Šafr, Karel; Svoboda, Jakub; Brabec, Marek; Hlinka, Jaroslav

Abstract

The transformation of the electricity sector and the rapid penetration of photovoltaic power plants (PVPPs) are increasing the demand for accurate short-term predictions of PVPP consumption and production. Most studies work with large amounts of data and a fairly rich training set. In real-world cases, however, more challenging scenarios occur, where the available data is smaller in scope, as in our case, a 21-day window with a daily horizon and 15-minute resolution. Even in this case, however, it is desirable to have a suitable prediction method for implementing the necessary components into the tools used. In this work, we compare five families of methods including linear models, LightGBM boosting trees, decomposition Prophet, generalized recurrent neural networks and their variants such as Time GRNN and GRNN Boost, and MLP/ANN. We develop a specific framework for thoroughly testing these tools, including their evaluation using appropriate statistical tests and thorough analysis of prediction failures. LightGBM shows the most robust performance across days, while Time GRNN and GRNN Boost are practically suitable alternatives, especially for PV production, thanks to a reasonable compromise between median error, variability, and time stability. For the more difficult prediction of consumption, LightGBM also outperforms other approaches. Surprisingly, a sufficiently well-set linear model provides an acceptable alternative, despite its decreased temporal stability. The paper discusses both the quantitative sensitivity as well as specific limitations of individual methods.

Full text

Short-term prediction of consumption and production of energy⋆ Ludmila Petkovováa,David Hartmana,b,∗,Karel Šafra,Jakub Svobodab,Marek Brabecband Jaroslav Hlinkab aUnicorn University, V Kapslovně 2767/2, Prague, 130 00, Czech Republic bInstitute of Computer Science of the Czech Academy of Sciences, Prague, Pod Vodárenskou věží 271/2, 18200, Czech Republic ARTICLE INFO Keywords: prediction artificial intelligence neural networks ensemble methods LightGBM GRNN ANN RNN Prophet energy production energy consumption ABSTRACT The transformation of the electricity sector and the rapid penetration of photovoltaic power plants (PVPPs) are increasing the demand for accurate short-term predictions of PVPP consumption andproduction.Moststudies work with largeamountsofdataandafairly richtrainingset. In realworld cases, however, more challenging scenarios occur, where the available data is smaller in scope,asinourcase,a 21-day windowwithadaily horizon and 15-minute resolution. Eveninthis case, however, it is desirable to have a suitable prediction method for implementing the necessary components into the tools used. In this work, we compare five families of methods including linear models, LightGBM boosting trees, decomposition Prophet, generalized recurrent neural networks and their variants such as Time GRNN and GRNN Boost, and MLP/ANN. We develop a specific framework for thoroughly testing these tools, including their evaluation using appropriate statistical tests and thorough analysis of prediction failures. LightGBM shows the most robust performance across days, while Time GRNN and GRNN Boost are practically suitable alternatives, especially for PV production, thanks to a reasonable compromise between median error, variability, and time stability. For the more difficult prediction of consumption, LightGBM also outperforms other approaches. Surprisingly, a sufficiently well-set linear model provides an acceptable alternative, despite its decreased temporal stability. The paper discusses both the quantitative sensitivity as well as specific limitations of individual methods. 1. Introduction The transformation of energy systems associated with the massive integration of renewable sources, especially photovoltaic power plants (PVPPs), is fundamentally altering the nature of the electricity grid. The growing share of fluctuating sources requires accurate and reliable short-term predictions of consumption and production, which are necessary for grid balancing, flexibility management, and trading on energy markets. The accuracy of estimates over a horizon of hours to one day is directly reflected in operational stability and in the costs associated with reserve capacities (Aguilar Madrid et al.,2021). The existing literature offers a wide range of methods. Classical time series models (ARIMA/SARIMA) provide transparent and computationally inexpensive solutions (Hyndman and Athanasopoulos,2018), decomposition approaches (e.g., Prophet) allow explicit work with trends, seasonality, and special days (Taylor and Letham,2018), while tree ensemble methods and boosting (Ke et al.,2017) and deep neural architectures (Challu et al.,2023;Olivares et al.,2023) can capture complex nonlinear relationships. Review papers emphasize that model performance depends not only on their complexity, but also on the quality of meteorological inputs and the appropriate inclusion of calendar effects (Mamun et al.,2020;Akhtar et al.,2023). Most published studies work with long time series (months to years). However, such history is often not available in the environment of small and medium-sized distribution system operators. Short training windows significantly increase the risk of overfitting, limit the usability of complex algorithms, and require stricter validation procedures. At the same time, problems may arise with capturing fluctuations or seasonal cycles; for example, predictions with a quarter-hourly step may have difficulty capturing weekly or even daily characteristics. It is well-known that calendar factors (working days, weekends, holidays, transition days) significantly modify consumption behavior (López et al., ⋆This work was supported by project no. TK05020142, carried out with the support of the Technology Agency of the Czech Republic under the THETA programme. ∗Corresponding author [email protected] (D. Hartman) ORCID(s): 0000-0001-6805-2729 (L. Petkovová); 0000-0003-3566-8214 (D. Hartman); 0000-0003-3108-6540 (K. Šafr); 0009-0007-6186-6392 (J. Svoboda); 0000-0001-6367-5791 (M. Brabec); 0000-0003-1402-1470 (J. Hlinka) Petkovová et al.: Preprint submitted to Elsevier Page 1 of 31 Short-term prediction of consumption and production of energy 2022), while sudden changes caused by holidays or meteorological fluctuations challenge the robustness of models and their ability to generalize (Ziel,2018;Chapagain et al.,2020). From a methodological point of view, it is therefore necessary to find a balance between interpretability and accuracy: linear and decomposition models offer transparent outputs, while ensemble and deep neural models provide higher predictive accuracy but with limited interpretability. The main objective of this study is to systematically compare the performance of five major families of prediction methods: linear regression (LIN), tree ensemble methods (TREE), decomposition models (PROPHET), generalized regression neural networks (GRNN), and multilayer perceptrons (ANN). All models are tested in a unified experimental framework with a harmonized pipeline including data imputation, feature engineering, and rigorous prevention of data leakage. The study provides a quantitative comparison of accuracy, an assessment of the importance of exogenous predictors, and recommendations for the practical implementation of prediction systems in environments with limited data history. The work is divided into the following chapters. Chapter 2presents literature studying related problems and provides an overview of the most commonly used methods in the context of the studied task. The following Chapter 3 presents the available data and explains the regression problem studied by identifying the explained and explanatory variables. Chapter 4provides an overview of the methods considered in this study with a description of their principles and parameterization. It is followed by Chapter 5, which describes the results, and Chapter 5.3, which discusses the observed properties and provides a summary of the results. 2. Related work Short-term load and generation forecasts (STLF/STGF) represent a long-term area of development at the intersection of energy, statistics, and machine learning. Historically, approaches based on classical time series analysis, particularly ARIMA/SARIMA and related methods (Pierre et al.,2023), have dominated. These models are valued for their transparency, interpretability, and low computational requirements, but their weakness is their limited ability to capture significant nonlinearity. With the increasing availability of computing power, tree ensemble methods and gradient boosting have come to the fore (Breiman,2001;Friedman,2001;Zhou,2021). Among modern implementations, LightGBM is widely used in the energy sector, combining histogram binning with leaf-wise tree growth and offering high performance on structured data (Ke et al.,2017). Decomposition methods, represented in particular by Prophet models (Taylor and Letham,2018), provide an interpretable framework in which trends, seasonality (Fourier terms), and the effects of holidays or special days can be modeled separately. In terms of short training windows and fine time granularity (15 minutes), they are particularly valuable for their transparency and relative resistance to overfitting. Comparative studies note that although Prophet may not always achieve minimum error, its interpretability and easy integration of holidays make it a strong reference model (Menculini et al.,2021). For modeling calendar effects in the electric power industry, the importance of revising the typology of days, distinguishing not only between working days, weekends, and holidays, but also transition days and isolated working/non-working days, has been repeatedly demonstrated (Ziel,2018;López et al.,2022). The use of artificial neural networks (ANN) in short-term load forecasting is now standard practice, ranging from classic multilayer perceptrons (MLP) to specialized architectures for time series. Among the newer models, N-BEATSx and NHITS are particularly prominent, combining a decomposition view with hierarchical representation learning and providing competitive results across domains (Olivares et al.,2023;Challu et al.,2023). In practice, neural network training is stabilized by modern techniques, in particular dropout,batch normalization, and the Adam optimizer (Srivastava et al.,2014;Ioffe and Szegedy,2015;Kingma and Ba,2015). General regression neural networks (GRNN) (Specht,1991) can be understood as nonparametric kernel regression with radial basis functions, whose theoretical basis lies in methods of nonparametric density estimation (Silverman, 1986;Bishop,2006). The key hyperparameters are the choice of kernel and bandwidth (𝜎), which determine the smoothness of the approximation and the degree of bias–variance tradeoff. The advantage of GRNN is very fast learning without iterations and good functional approximation even with small samples; the weakness is computational complexity and limited extrapolation beyond the training data range. The inclusion of meteorological variables (temperature, sunshine, and wind) is one of the key factors increasing the accuracy of short-term predictions for both consumption and production (Shering et al.,2024). Furthermore, the importance of a detailed calendar has been repeatedly demonstrated—in addition to dividing days into working days, Petkovová et al.: Preprint submitted to Elsevier Page 2 of 31 Short-term prediction of consumption and production of energy weekends, and holidays, it is recommended to explicitly take into account transition days and isolated working/nonworking days (Ziel,2018;López et al.,2022). In practice, combining autocorrelation features with calendar and meteorological data has also proven effective. This combination generally increases the stability of models across days and seasons (Aguilar Madrid et al.,2021). A significant portion of published works assume long historical series (years), which facilitate the learning of seasonal structures (Hyndman and Athanasopoulos,2018;Hassani and Silva,2015). Application contexts with a short history are much less represented in the literature, e.g. Hooshmand and Sharma (2019), even though they often occur in practice – for example, in new installations, pilot projects, or locations without continuous monitoring. In such conditions, consistent data preprocessing and a strict validation scheme become particularly important. Forecasts with a 15-minute resolution are essential for operational management. However, they bring a higher proportion of noise, frequent zeros (for PV), and sensitivity to inaccuracies in meteorological inputs. Models that combine multiple time horizons or hierarchically decompose seasonal components (Challu et al.,2023;Olivares et al.,2023) while utilizing a rich feature set appear to be promising. Overall, it can be summarized that the literature offers a wide range of methods for short-term load and production predictions – from classic linear models through tree ensembles to modern neural architectures and hybrid approaches. Each of these families of methods has its advantages and weaknesses: linear models excel in interpretability, boosting trees in robustness and accuracy, decomposition models (e.g., Prophet) in transparency and easy integration of calendar effects, while neural networks and GRNNs provide high flexibility but at the cost of more demanding parameter settings and limited interpretability. Nevertheless, it remains an open question how these methods perform in the context of shorter training histories and fine time granularity (e.g., 15-minute intervals), where specific problems arise—higher noise, frequent zero values, and sensitivity to the quality of meteorological inputs. Previous work shows that individual approaches may behave differently depending on the length of the window, the type of predicted variable (consumption vs. production), and the availability of exogenous predictors. Systematic comparisons of prediction performance across families of methods can thus help select a suitable model for a given situation. 3. Data The analysis was performed on real data from the distribution area of the Czech Republic for the period from August 1, 2024, to August 1, 2025 (inclusive). The dataset includes both aggregated electricity consumption and production from photovoltaic power plants (PVPP) in 15-minute intervals. This step allows for detailed capture of short-term fluctuations and at the same time reflects the practical requirements for operational predictions in distribution systems. The training window was set at 21 days, which corresponds to 2016 observations, and the prediction horizon is 24 hours, i.e., 96 quarter-hour steps ahead. Within the scope of the prediction problem studied, the explained variables are time series of aggregate electricity consumption and aggregate production from photovoltaic power plants. The original measurements were available as instantaneous power 𝑃𝑡(MW), which was converted to energy 𝐸𝑡(MWh) for modeling purposes. The quantity defined in this way corresponds to the amount of energy consumed or produced in a given 15-minute interval. This conversion allows for uniform processing of consumption and production, while reflecting standard conventions in the field of short-term modeling of energy time series. An overview of the explanatory variables used is given in Table 1. The set of explanatory variables was designed so that the individual variables capture both cyclical consumption patterns and meteorological and socially conditioned variations. They include three basic categories: (i) calendar factors, (ii) meteorological data, and (iii) historical values of target variables. An overview of the explanatory variables used is provided in Table 2. The first group of explanatory variables are calendar factors. These were constructed with the aim of more accurately reflecting socio-economic cycles. Instead of a binary classification (working day vs. weekend/holiday), a more refined typology of ten categories was introduced. This includes, for example, distinguishing between days before and after a day off or isolated working days between holidays. This approach is recommended in the literature, especially for short-term predictions, where transition days can significantly disrupt the standard daily profile (Ziel, 2018). The coding was implemented using a one-hot scheme, which allows for flexible integration into all considered model families. Important external explanatory variables are meteorological predictors, which mainly include air temperature and insolation. Temperature and insolation values were originally available on an hourly basis. During preprocessing, they Petkovová et al.: Preprint submitted to Elsevier Page 3 of 31 Short-term prediction of consumption and production of energy Table 1 Explained variables. Variable Description Unit (periodicity) Source / Note Consumption 𝐸cons 𝑡Aggregated electricity consumption at points of delivery at time 𝑡 MWh (15 min) Distribution data; 𝑃𝑡→𝐸𝑡conversion Production 𝐸FVE 𝑡Aggregated production from PVPP at time 𝑡MWh (15 min) Operational data from PVPP; 𝑃𝑡→𝐸𝑡conversion Table 2 Explanatory variables. Group Description Calendar and time Hour of day and day of week (one-hot and cyclical coding), binary indicators is_weekend,is_holiday; expanded energy calendar (only for consumption). Meteorology Temperature (15-minute historical forecast) and insolation derived from cloud cover (originally hourly sampling; harmonization and PCHIP interpolation to 15 minutes). History of target Lags of target variable (recent and daily history) limited by availability of real data; window statistics and differences. were converted to 15-minute granularity, see chapter 4.1. Meteorological factors thus provide an exogenous source of variability, which is particularly important for predicting PV production. The predictors ultimately included lagged values of explained variables (e.g., with lags of 15 minutes, 30 minutes, 1 hour, and 1 day), supplemented by moving averages or standard deviations over the last 24 hours. These variables convey information about short-term dynamics and recurring daily patterns. In the context of limited historical data, they provide models with the necessary context for stable prediction. 4. Methods In this section, we will present the methodology of data preprocessing, describe prediction models and the optimization of their hyperparameters, and finally present an evaluation scheme for the resulting comparison of models. 4.1. Data preprocessing The preprocessing pipeline used includes standard steps to ensure the quality of data entering the prediction models: (i) defining periods and sources, (ii) converting power to energy in quarter-hour intervals, (iii) harmonizing the timelines of all predictors and imputing missing values. Depending on the model used, this is generally followed by (iv) feature engineering (delays, cyclic transformations, moving statistics, Fourier terms, etc.), (v) standardization. (i) Period and data sources. The analysis covers the period from August 1, 2024, to August 1, 2025. Furthermore, the period from July 1, 2024, to July 31, 2024 for the initial search for hyperparameters and the first training window covering the last three weeks of that month for the prediction of the first evaluation day (August 1, 2024). Historical consumption and production are provided by internal sources (consumption: 15 minute sampling, production: hourly sampling), both in power units (MW). Meteorological predictors include temperature and insolation derived from cloud cover, available only in hourly increments and therefore interpolated to 15-minute sampling. The energy calendar distinguishes between working days, weekends, holidays, and transition days in an extended typology. In the models, it is used only for consumption prediction. (ii) Conversion of power to energy The source data is provided as power 𝑃𝑡(MW). This data was converted to energy 𝐸𝑡(MWh) at 15-minute intervals: 𝐸𝑡=𝑃𝑡⋅Δ𝑡, Δ𝑡= 0.25 h.(1) (iii) Harmonization and imputation. All data are harmonized to a uniform 15-minute grid in UTC time. Hourly meteorological data were interpolated as follows: temperature data were interpolated using the Piecewise Cubic Hermite Interpolating Polynomial (PCHIP) method (Fritsch and Carlson,1980). Irradiance values were determined as Petkovová et al.: Preprint submitted to Elsevier Page 4 of 31 Short-term prediction of consumption and production of energy hourly values divided by four and inserted into the corresponding quarter-hour samples. The reason for this procedure, as opposed to interpolation, is that in the case of irradiance, the assumption of gradual change is not justified (due to rapidly changing cloud cover, the irradiance value can both increase and decrease). Finally, although solar panels can produce non-zero energy at night under certain circumstances (due to street lighting or sufficient reflection of sunlight from the moon), nighttime production was set to zero because these effects are marginal from a practical point of view but require robust modeling. (iv) Feature engineering. Feature engineering captures cycles, calendar effects, and short-term and daily dynamics. •Calendar and time: hour of the day ℎ𝑡and day of the week 𝑑𝑡in the form of one-hot and cyclic transformations hour_sin𝑡= sin(2𝜋ℎ𝑡 24 ),hour_cos𝑡= cos(2𝜋ℎ𝑡 24 ); dow_sin𝑡= sin(2𝜋𝑑𝑡 7),dow_cos𝑡= cos(2𝜋𝑑𝑡 7). For consumption, further binary indicators of the extended energy calendar (working days, weekends, holidays, transition days). •Delayed variables: for each explanatory variable 𝑥(𝑗), recent history 𝑥(𝑗) 𝑡−𝑘for 𝑘= 1, 𝑑𝑜𝑡𝑠, 17 (last observations in the current day) and daily history 𝑥(𝑗) 𝑡−𝑘for 𝑘= 97,…,115 (window starting 24 hours ago). •Target lag (limited by the availability of real data): for 𝑦𝑡we use 𝑦𝑡−𝑘,𝑘∈ {96,…,119} (recent history) and 𝑘∈ {192,…,215} (daily history). •Moving statistics (24 hours): mean and standard deviation from the last 96 steps, mean24ℎ(𝑡) = 1 96 96 ∑ 𝑘=1 𝑦𝑡−𝑘,std24ℎ(𝑡) = √ √ √ √1 96 96 ∑ 𝑘=1 (𝑦𝑡−𝑘−mean24ℎ(𝑡))2. •Difference: diff1(𝑡)=𝑦𝑡−𝑦𝑡−1 and diff96(𝑡)=𝑦𝑡−𝑦𝑡−96. •Harmonic signs (Fourier): for models with additive seasonality (e.g., Prophet), we generate Fourier terms for the daily period (𝑃= 96) with order 𝐾= 2–5; again, all from the training segment only. All features are constructed causally (i.e., from information available up to time 𝑡) and with information leakage prevention. (v) Standardization. For scale-sensitive models (ANN/MLP, GRNN, etc., see Chapter 4), we use Z-score standardization 𝑥𝑡,𝑗 = (𝑥𝑡,𝑗 −𝜇𝑗)∕𝜎𝑗, where 𝜇𝑗and 𝜎𝑗are estimated in each slice exclusively on the training part train and applied fixedly to both the validation and test segments. 4.2. Model Specifications Below is a detailed description of individual model families, including mathematical formulations, key parameters, and methodological notes on their deployment within a short window and high time granularity. A basic overview of all models is provided in Table 4. Linear models are among the longest-used methods for time series prediction. Their advantages include transparent interpretation of coefficients, low computational complexity, and robustness to limited training samples. For a basic comparison, we included two variants of linear models in the analysis, which differ in the range of input variables. These models provide a framework for comparison with more advanced nonlinear approaches. Linear Small. Linear regression (OLS) over lagged values of the target variable (two days of lagged samples). Linear Big. OLS over complete feature set: multiple order lags (short-term and daily), moving statistics (averages, standard deviations), difference variables, harmonic terms, detailed calendar indicators, and meteorological predictors. In this variant, the inputs are standardized (Z-score) with parameters (𝜇, 𝜎)estimated on the training segment. Petkovová et al.: Preprint submitted to Elsevier Page 5 of 31 Short-term prediction of consumption and production of energy Table 3 Summary of explanatory variables used in modeling. Group Description Unit Note Calendar Day type (working day, weekend, holiday, transition days); hour and day of the week with cyclic coding (dummies and integer encoding) unitless Energy calendar used only for consumption Meteorology Temperature; insolation derived from cloud cover (PCHIP interpolation to 15-minute) ◦C, Wm−2 Weather forecasts harmonized to a 15minute grid History Delay of target and exogenous variables (1– 96; 24–48h back) according to the original variable Causally constructed Featured variables Moving statistics (24h average and standard deviation); Fourier terms (order 𝐾= 1..5) MWh, unitless Capture daily variability and seasonality. Table 4 Conceptual overview of model groups. Group Model Principle Specifics / role in comparison Linear Linear Small Linear regression (OLS) only on previous values of the target variable Baseline. Linear Big Linear regression (OLS) with complete featurization Baseline with predictors; strong interpretability of coefficientss of exogenous factors. Tree LightGBM Gradient boosting regression trees High-performance for tabular data; requires careful regularization. Decomposition Prophet 1 Additive decomposition (trend + daily seasonality + holidays) Univariate, interpretable baseline model; separation of trend, seasonality, and special days. Prophet 2 Prophet 1 with exogenous regressors (meteorology, calendar, lags...) Multivariate variant; suitable for consumption and production of PV energy due to explicit inclusion of exogenous influence. GRNN GRNN (basic) Nonparametric kernel regression, weights from similarity Nonlinear approximation without iterative learning; sensitivity to kernel width choice. Boosted GRNN Sequential correction of residuals (boosting) Reduction of systematic bias; combination of GRNN with iterative correction. RF GRNN Randomly sampled predictors and features to achieve less correlated models. Ensemble stabilization of estimate; variance reduction and improved robustness. Time GRNN Time penalization in the distance metric Weighting is applied to the kernel or to the output from distance metrics—larger weights for recent training examples, improved relevance in a short window. MLP ANN Small Shallow network. MLP with low capacity and strong regularisation, similar to logistic regression but with the principles of ANN models (dropout, etc.) Fast and stable configuration; suitable for smaller hyperparameter spaces. ANN Big Shallow network. MLP with larger capacity (net width) Large approximation power, necessary combination of dropout, L2, and normalization to prevent overfitting. ANN Deep MLP with more hidden layers (2-5) Hierarchical representation and flexible modeling of complex patterns; larger risk of overfitting. 4.2.1. LightGBM LightGBM (Light Gradient Boosting Machine) is an efficient implementation of gradient boosting decision trees (Ke et al.,2017), based on the general framework of gradient additive approximation (Friedman,2001). The model approximates the objective function as the sum of weak models 𝑓𝑚from the set of decision trees : 𝑦(𝑀) 𝑖= 𝑀 ∑ 𝑚=1 𝑓𝑚(𝐱𝑖), 𝑓𝑚∈,(2) where 𝑀is the number of iterations (trees), 𝐱𝑖is the vector of predictors, and 𝑦(𝑀) 𝑖are the resulting predictions. Petkovová et al.: Preprint submitted to Elsevier Page 6 of 31 Short-term prediction of consumption and production of energy Optimization proceeds iteratively: in the 𝑚th step, a new tree 𝑓𝑚is added, which approximates the negative gradient of the loss function 𝐿according to the current prediction: 𝑓𝑚= arg min 𝑓∈ 𝑛 ∑ 𝑖=1[𝑔𝑖𝑓(𝐱𝑖) + 1 2ℎ𝑖𝑓(𝐱𝑖)2],(3) where 𝑔𝑖and ℎ𝑖are the first and second derivatives (gradient and Hessian) of the loss 𝐿(𝑦𝑖, 𝑦(𝑚−1) 𝑖)(Friedman,2001). LightGBM implements two key innovations: (i) histogram splitting (quantization of continuous predictors into discrete bins), which significantly speeds up training, and (ii) a leaf-wise tree growth strategy, where the node with the largest loss reduction is added, resulting in deeper but more efficient trees (Ke et al.,2017). The main hyperparameters include the number of leaves (num_leaves), maximum tree depth (max_depth), minimum number of samples in a leaf (min_data_in_leaf), and regularization parameters. Subsampling and feature fraction also play an important role in reducing the risk of overfitting. 4.2.2. Prophet Prophet is a time series decomposition model developed by the Meta (formerly Facebook) research team (Taylor and Letham,2018). Its basic principle is to decompose the observed time series into several additive components: 𝑦𝑡=𝑔(𝑡)+𝑠(𝑡)+ℎ(𝑡)+𝜀𝑡,(4) where 𝑔(𝑡)represents the trend, 𝑠(𝑡)the seasonal components, ℎ(𝑡)the effects of holidays and special events, and 𝜀𝑡the random error component. The trend 𝑔(𝑡)can be specified linearly or logistically (with upper capacity). Daily seasonality is controlled by the default settings of the library (we do not prescribe an explicit order for Fourier terms); we do not use add_country_holidays. Seasonal components 𝑠(𝑡)are therefore modeled using Fourier series: 𝑠(𝑡) = 𝑁 ∑ 𝑛=1 [𝑎𝑛cos(2𝜋𝑛𝑡 𝑃)+𝑏𝑛sin(2𝜋𝑛𝑡 𝑃)],(5) where 𝑃is the period length and 𝑁is the order of the Fourier approximation. The influence of holidays ℎ(𝑡)is represented as indicator regressors for specific days or periods. In energy applications, this can be used to model public holidays or other specific days with atypical consumption or production patterns (Ziel,2018). Prophet also allows for multivariate extensions, in which exogenous regressors are added to the basic structure. In the energy sector, these are mainly temperature and insolation, whose influence is incorporated additively: 𝑦𝑡=𝑔(𝑡)+𝑠(𝑡)+ℎ(𝑡) + 𝜷⊤𝐱𝑡+𝜀𝑡,(6) where 𝐱𝑡denotes the vector of meteorological and calendar predictors. Key hyperparameters include the choice of trend type, the order of Fourier approximation, the specification of holidays, and the changepoint_prior_scale parameter, which determines the flexibility of the trend. In our setup, we also used an input-size multiplier (7×), which extends the length of the historical context even with short training windows. In our analysis, two configurations were chosen—univariate and multivariate—which differ in the number of input variables and the degree of complexity of the seasonal effects captured. Prophet 1 (univariate). The inputs for Prophet 1 are historical values of the target variable and a calendar of public holidays, daily seasonality with a period 𝑃= 96 and a Fourier order 𝐾= 2 (dominant daily cycle at a 15-minute interval). This model serves as the baseline for the decomposition family. Prophet 2 (multivariate). This variant extends Prophet 1 with exogenous meteorological variables (temperature, insolation) and a detailed energy calendar (working days, weekends, transition days, holidays (Ziel,2018;López et al., 2022)). In particular, the changepoint prior scale and seasonality prior scale were set, together with the choice of Petkovová et al.: Preprint submitted to Elsevier Page 7 of 31 Short-term prediction of consumption and production of energy Fourier orders 𝐾= 1..5for daily/weekly seasonality. For sufficient (but regulated) historical context even in a short window, an input-size multiplier (7×) was used. Both variants were calibrated within the internal division (train/val) in each slice of the sliding window and, after selecting the parameters, retrained on the entire 21-day window before generating a one-day prediction. In our context, Prophet proved to be a transparent and easily interpretable framework, particularly suitable for capturing dominant seasonal and calendar effects. Its advantages include relatively low tuning requirements and comprehensible results, while its weakness is its lower flexibility in modeling more complex nonlinear relationships. In short windows, Prophet is therefore more of a reference model that provides an easily interpretable basis for comparison with more advanced methods. 4.2.3. General Regression Neural Network (GRNN) General Regression Neural Network (GRNN) (Specht,1991) represents a specific neural architecture that is closely linked to nonparametric kernel regression and probability density estimation methods (Silverman,1986;Bishop,2006). The basic principle is that the conditional expected value of the target variable 𝑌with respect to the predictors 𝐗is approximated using the kernel function 𝐾(⋅): 𝑦(𝐱) = ∑𝑛 𝑖=1 𝑦𝑖𝐾(‖𝐱−𝐱𝑖‖ 𝜎) ∑𝑛 𝑖=1 𝐾(‖𝐱−𝐱𝑖‖ 𝜎),(7) where𝜎representsthe bandwidth,whichdetermines thesmoothness of the approximation and the trade-off between bias and variance. The most commonly used is a Gaussian radial basis function. The GRNN architecture has four layers: (i) input layer, (ii) radial basis (pattern) layer representing training patterns, (iii) regression layer that calculates weighted sums of outputs, and (iv) output neuron. Learning is non-iterative – the network stores training patterns directly in the pattern layer, and prediction is performed by calculating kernel weights, which makes GRNN very fast during training but more computationally demanding during prediction (query complexity (𝑛)). The main advantages of GRNN include the ability to accurately approximate even complex nonlinear functions on small training sets and the absence of the need for iterative optimization (Specht,1991). On the other hand, its limitations include its complexity with large datasets and limited extrapolation ability outside the scope of training data (Bishop,2006). Ensemble variants. Various ensemble and hybrid variants have been developed in the literature, e.g., Boosted GRNN or Random Forest GRNN, which increase robustness and accuracy (Ali et al.,2024). In energy applications, GRNN has been used primarily for short-term load and production profile estimation using meteorological predictors (Ali et al.,2024). Implementation notes. In the practical implementation of GRNN, several aspects proved to be crucial: •Computational complexity. The answer to a query requires (𝑛)operations, where 𝑛is the number of samples in the training window. For 21 days ×96 steps (approximately 2016 samples), this complexity is manageable even when using ensemble extensions. •Choice of kernel width (𝜎). The parameter 𝜎determines the smoothness of the approximation. Small values lead to overfitting (strongly local adaptation), while large values cause excessive smoothing and systematic bias. In this study, 𝜎was calibrated using internal splitting into training/validation data, and various kernel functions (RBF, exponential, linear, quadratic) were tested. •Extrapolation. GRNN has limited extrapolation ability beyond the range of training values. In cases of abrupt changes (e.g., sudden meteorological breaks), systematic deviations occur. This shortcoming can be partially mitigated by ensemble or time-weighted variants. To increase robustness and reduce prediction variance, four complementary variants were tested on top of the basic GRNN architecture. These approaches differ in the principle of combining individual models and in the way they Petkovová et al.: Preprint submitted to Elsevier Page 8 of 31 Short-term prediction of consumption and production of energy account for the variability of training data. The basic GRNN serves as a reference method for kernel regression. GRNN Boost uses sequential correction of systematic errors (boosting) and increases the ability to capture more complex nonlinear relationships. GRNN Random Forest (GRNN RF) builds on bagging and random subspace and relies on averaging predictions from multiple independently trained models, thereby reducing variance and increasing stability. The last variant, Time GRNN, extends the standard method with explicit time weighting, which favors recent patterns and improves adaptation to short-term changes. Each of these variants is described in more detail below, including their advantages and possible limitations. GRNN (basic variant). The basic GRNN model is based on kernel regression with radial basis functions (RBF, exponential, linear, quadratic). The prediction is a weighted average across all training patterns, where the weights decrease with increasing distance in the predictor space. The key parameter is the kernel width 𝜎, which determines the trade-off between local accuracy and global smoothness. This variant serves as the default reference implementation, capable of modeling even more complex nonlinearities well, but sensitive to the choice of 𝜎and with limited extrapolation ability. Choice of kernel function. In practical implementation, we tested several types of kernel functions that determine the weight of individual training patterns according to their distance from the current query 𝐱. For a pair of vectors 𝐱 and 𝐱𝑖with Euclidean distance 𝑑=‖𝐱−𝐱𝑖‖and bandwidth 𝜎, we considered the following kernel shapes: 𝐾RBF(𝑑) = exp(−𝑑2 2𝜎2), 𝐾Exp(𝑑) = exp(−𝑑 𝜎), 𝐾Lin(𝑑) = max(0,1 − 𝑑 𝜎), 𝐾Quad(𝑑) = max(0,1 − (𝑑 𝜎)2). The RBF (Gaussian) kernel provides a smooth approximation and is the most common in practice, the exponential kernel reduces the influence of distant patterns more slowly, while the linear and quadratic kernels introduce a compact carrier (zero weights for 𝑑 > 𝜎), which leads to more local approximations. All of these variants are implemented in the script and can be optionally enabled during training and prediction. GRNN Boost. Individual models are arranged sequentially so that each new model approximates the residuals of the previous model. This principle gradually corrects systematic errors and improves the ability to capture more complex relationships. The advantage is reduced bias and greater flexibility, while the disadvantage is an increased risk of overfitting when there are too many iterations or the learning rate is set incorrectly (Ali et al.,2024). GRNN Random Forest. An ensemble variant based on the principle of bagging and random subspace. Individual models are trained on bootstrapped subsamples of training data or on randomly selected predictor subspaces, and they can use different values of 𝜎and different kernel functions. The final prediction is given by the ensemble average. This approach reduces variance, mitigates sensitivity to parameter choice, and increases robustness to heterogeneous days (Zhou,2021). Time GRNN. This variant extends the standard method with a time-weighted distance metric 𝑑𝜆(𝐱,𝐱𝑖), which favors newer patterns over older ones. By penalizing temporal deviations (e.g., hour of the day, day of the week), the model better adapts to short-term changes and non-stationarity in the data. Time GRNN is therefore particularly suitable for applications where recent developments have significantly higher predictive value than historical samples. In terms of computational complexity, all ensemble variants were well manageable even with a 21-day window (2016 patterns), as the combination of several dozen models did not represent a limiting factor. The use of ensemble averaging significantly contributed to reducing the variability of predictions and supported performance stability across different types of days. Petkovová et al.: Preprint submitted to Elsevier Page 9 of 31 Short-term prediction of consumption and production of energy 5.1.1. Aggregated production results The lowest values of the median daily MAE (Figure 1A) are achieved by LightGBM, with a median of 457 MWh, closely followed by the deeper neural networks ANN Deep (485 MWh) and ANN Big (519 MWh). The ANN Small model (574 MWh) exhibits slightly higher errors but still clearly outperforms both linear and simpler nonlinear models. At the same time, Figure 1B illustrates the distribution of daily MAE across the individual methods. From these, it is evident that the most promising results are achieved by the distributions for methods based on ANN. These distributions are comparable to those of the LightGBM methods and, to a lesser extent, GRNN Boost. When examining the average ranking of these models and the results of the Nemenyi pairwise comparison (Figure3A),itcan be seen that the bestresultsareachieved byLightGBM(2.83),followed by ANN Big (3.43) and ANN Deep (3.63). The Nemenyi test does not confirm that the differences between LightGBM and the deeper ANN models are statistically significant (𝑝≈ 0.50 for LightGBM vs. ANN Big, 𝑝≈ 0.11 for LightGBM vs. ANN Deep). However, the more powerful Shaffer test was able to distinguish the pair LightGBM and ANN Deep at the 5% significance level, although the pair LightGBM and ANN Big remained statistically indistinguishable. The Diebold–Mariano test yields results similar to those of the Nemenyi test, i.e. LightGBM and ANN Deep exhibit very similar behavior over time, although ANN Deep achieves a slightly worse average ranking compared to LightGBM. It should also be noted that the ANN-prefixed models based on neural networks are advantaged by a longer training window; see details in Chapter 4.3. Their strong results may therefore not be entirely comparable. From the GRNN family of models, the best results were achieved by GRNN Boost (851 MWh), which shows approximately a 74% improvement compared to the baseline, yet still stays behind LightGBM and the ANN family. Another variant is the Time GRNN model (1124 MWh), followed by the remaining variants (the basic GRNN and GRNN Random Forest), which exhibit higher errors, with medians ranging approximately between 1300–1400 MWh. These two methods (the basic GRNN and GRNN Random Forest) form an indistinguishable pair according to both the Nemenyi and Shaffer tests at the 5% significance level (average ranks 7.68 and 7.80). In contrast, the Diebold–Mariano pairwise test significantly rejects the hypothesis of identical results for these models. This suggests differences in the temporal behavior of corresponding errors. Another interesting result is the effectiveness of the Time GRNN variant, which incorporates time explicitly into the predictions and thus achieves better results than both the basic variant and the ensemble variant with Random Forest. However, it should be noted that the GRNN Boost variant appears more efficient, even though, for example, in terms of maximum values, it performs worse than Time GRNN, which results in comparable mean error levels for these methods. All three pairwise tests (Nemenyi, Shaffer, and Diebold–Mariano) did not confirm significant differences between these two methods at the 5% significance level. Moreover, in the case of the Diebold–Mariano test, the equality of ranking between GRNN Boost and the basic GRNN model cannot be rejected. On the other hand, the Time GRNN method can be significantly distinguished from the GRNN method. This indicates a different structure of errors in these models, which requires a more detailed investigation. For this reason, in the next chapter 5.2, we examine temporal stability and sensitivity analysis. The linear models included as baseline reference models expectedly achieve considerably worse results. Linear Big, with a median of 2190 MWh and an average rank of 9.05, does outperform the baseline but still lags behind the nonlinear approaches. Based on both the Nemenyi and Shaffer tests, it forms a single indistinguishable cluster together with the worst-performing models – Prophet 1 (2774 MWh, average rank 8.94), Prophet 2 (2744 MWh, average rank 9.21), and Linear Small (2336 MWh, average rank 9.22). For the Prophet model distributions, a pronounced rightskewness can also be observed, reflecting a decrease in model quality in the sense of many outliers with large prediction errors, despite relatively good behavior in the typical case (median error). Similar behavior, however, can also be seen in the linear models. Overall, it can be concluded that for the prediction of photovoltaic production, the best results are provided by boosting algorithms and deeper neural networks, which reduce the error relative to the baseline by up to approximately 80 %. When excluding the not entirely comparable set of ANN methods, the clear winner is LightGBM, with two possible alternative methods — GRNN Boost, which achieves a better result, and a comparable Time GRNN, which exhibits more bounded maxima. It thusappears that the best-performing method is LightGBM, combining a lowmedian error with relatively low variability, confirming its ability to flexibly respond to nonlinear meteorological effects. The two additional GRNN variants, GRNN Boost and Time GRNN, can therefore be considered suitable candidates for this task. Petkovová et al.: Preprint submitted to Elsevier Page 16 of 31 Short-term prediction of consumption and production of energy 5.1.2. Aggregated consumption results The lowest median values of daily MAPE are achieved by modern nonlinear methods, particularly LightGBM (2.43 %) and the deeper neural networks ANN Big (2.43 %) and ANN Deep (2.71 %). The average ranking of model results for consumption, see Figure 3, shows that LightGBM (3.74) and ANN Big (4.25) form a pair of models with the best performance. None of the applied tests confirms that the difference between LightGBM and ANN Big is statistically significant. All tests also indicate a strong similarity between the results of the ANN Big and ANN Deep models. It is worth noting again that the ANN models are advantaged in this comparison, as they represent more strongly informed models. The neural network ANN Small (3.07 %) and the linear model Linear Big (3.24 %) are already slightly shifted compared to the pair of leading models, followed closely by the basic baseline linear model and the Prophet 2 model (3.58 %). From this, it can be seen that consumption can, to some extent, be predicted even with a linear model, whereas some nonlinear models, such as the GRNN variants, are not particularly suitable for this purpose. In general, however, it can be observed that, compared to generation, the medians of daily errors are more similar – a finding confirmed by both the Nemenyi and Shaffer tests. The aforementioned property generally applies to consumption predictions, where, with the omission of ANN models and apart from the winning LightGBM, the differences in errors among the other models are not particularly substantial. For instance, models performing worse than the baseline linear model (Linear Small) have, except for Prophet 1, quite similar medians, which are comparable to the linear baseline. This is also the case for models from the GRNN family (medians 3.63–3.91 %) and Prophet 2. The results of these models are close to the baseline, whereas Prophet 1 (4.31 %) shows worse performance and lags behind most other approaches. Pairs of models that belong to indistinguishable clusters (according to the Shaffer test) can, in some cases, be differentiated based on the Diebold–Mariano test. For example, within the group consisting of Linear Big, GRNN Boost, Prophet 2, and Linear Small, the hypothesis of equality of Linear Big with all other models in the group was rejected. Similarly, the pair ANN Small and GRNN Boost can already be distinguished at the 5% significance level. From the presented data, it can be observed (similarly to the production) that apart from the winning LightGBM model, the boosted ANN models, particularly those with deeper architectures, tend to dominate. The individual GRNN variants form a more or less coherent group, which, however, is not particularly successful in this prediction task. A relatively interesting finding here is the higher effectiveness of the Prophet 2 model compared to its performance in generation. Overall, the situation for consumption is somewhat more complex, and we also find that the initially similar appearance of the model results may be disrupted by their differing temporal dynamics. In general, LightGBM can be identified as the clear winner, and Linear Big as a fairly good alternative for the chosen training window and prediction horizon. 5.2. Stability and sensitivity over time The prediction of consumption and photovoltaic production (FVE) strongly depends on time, both from the perspective of energyconsumption(influencedby consumer habits) andfromthe perspectiveofphotovoltaic generation (affected by daily cycles or cloud cover). For this reason, we also present the error values as a function of time and their temporal sensitivity. The dependence of errors on a specific month or season can be examined through the analysis of the number of outliers, i.e., values deviating from the median by more than one and a half times the IQR, for individual models. The proportion of outlier error points for each model and their occurrence across different seasons is shown in Figure 5. The results for consumption are presented in Figure 6. In connection with the distribution of days, it is also possible to observe the distribution of outlier values for selected types of days (according to the energy calendar, excluding less frequent categories) — for photovoltaic production in Figure 7and for consumption in Figure 8. Detailed distributions of production and consumption errors divided by various time intervals can also be found in the Appendix Cseries of figures for different temporal segments. A finer distribution of daily production error values by individual months can be seen in Figure 15, while the corresponding distribution for consumption is shown in Figure 16. Finally, the distribution by individual days of the week is provided for production in Figure 13 and for consumption in Figure 14. To verify the dependence on time, an analysis of prediction errors for both production and consumption was also performed as a function of the hour of the day and the type of day, as well as the hour of the day and the day of the year. Here, we present only the results for selected models — for production: LightGBM, GRNN Boost, GRNN Time, and Petkovová et al.: Preprint submitted to Elsevier Page 17 of 31 Short-term prediction of consumption and production of energy the baseline Linear Small (Figure 9); and for consumption: LightGBM, GRNN Time, Linear Big, and Linear Small (Figure 10). From the perspective of the sensitivity of production and consumption predictions, it is possible to display the error results when individual time segments are excluded from the analysis. Given the length of the time series and the nature of the data, the analysis is performed on aggregated days of the energy calendar — for production in Figure 11 and for consumption in Figure 12 (Appendix C). 5.2.1. Production dependence on time and its sensitivity The results show that among the models least affected by extremes are GRNN Random Forestand Time GRNN. The latter ranked second in terms of median daily error. The winning model with the lowest median error, i.e., LightGBM, also exhibits a relatively low proportion of outliers. Surprisingly, both Prophet 1 and GRNN show reasonably good behavior. In contrast, the model most affected by extremes is ANN Deep. In general, models based on ANN do not perform particularly well from this perspective, especially during the summer months (a high overrepresentation of outliers during this period), particularly in June and July, when generation is at its highest and the models struggle to cope with sudden changes in solar irradiance. The summer months are a general challenge for most of the stronger models, including the winning model (in terms of median error), LightGBM. The overrepresentation of spring days among the outlier errors mainly concerns the linear models Prophet 1, Prophet 2, and Linear Big (to a lesser extent also Linear Small and LightGBM). A potential issue could be sudden fluctuations in solar irradiance during periods of unstable cloud conditions. It should be noted, however, that the bias (measured by the number of extremes) of the LightGBM and Linear Small models is not particularly large. The weaker performance of the linear models may suggest the presence of specific nonlinear effects, although verifying such a hypothesis goes beyond the scope of this work. The distribution of outlier values for photovoltaic production (FVE) across selected day types (according to the energy calendar, excluding less frequent categories) can be found in Figure 7. The main observation from this figure is that theenergycalendarappearstohaveanoticeable,althoughin manycasesrelativelylimited,influenceonproduction, which may seem surprising. For the winning model LightGBM, this effect is not particularly visible. On the other hand, for models derived from GRNN, a reduction of such effects can be seen on weekends, while higher effects appear on days following holidays (typically Mondays). Considering that these models generally exhibit a very low number of outliers, however, this observation becomes less significant. If this were indeed a genuine effect, it could indicate a certain difficulty in adapting to results influenced by specific equipment reconfigurations or, conversely, a sensitivity to predictions of exogenous variables with a specific weekly cycle. For this reason, a sensitivity analysis related to the energy calendar was also carried out. The results show that LightGBM, GRNN Boost, and Time GRNN — the three best-performing models — are more or less immune to this transformation and do not display increased sensitivity. In contrast, increased sensitivity to the exclusion of different day types can be observed for Linear Small or Prophet 2. Another interesting observation is that although the pure GRNN model and Time GRNN are stable, the ensemble variant GRNN Random Forest exhibits higher sensitivity. These shortcomings could potentially be mitigated by a specific adjustment in the use of models – for example, by incorporating the energy calendar directly into the predictions – but for the purpose of model testing, and given the small number of outlier observations, these issues are not critical, and this property can reasonably be left unchanged. To verify the dependence on time, an analysis of generation prediction errors was also carried out as a function of the hour of the day and the type of day, as well as the hour of the day and the day of the year, see Figure 9. In general, it can be said that the models do not always adapt to the irradiance values, and some even generate values outside the daylight periods. For the winning model LightGBM, this phenomenon is not very pronounced, but it becomes apparent for weaker models — particularly the linear ones. This could, in the future, represent a possible path for improving the mentioned models. Conversely, no substantial systematic bias of errors depending on the day of the week has been confirmed. 5.2.2. Consumption dependence on time and its sensitivity Similarly to production, it is also possible to display the distribution of outlier values for consumption across selected day types (according to the energy calendar, excluding less frequent categories). The number of outlier values for individual models differs substantially compared to production. The fewest outliers appear in the linear models and some GRNN variants, including Time GRNN, which, however, are not particularly strong in terms of predictive power Petkovová et al.: Preprint submitted to Elsevier Page 18 of 31 Short-term prediction of consumption and production of energy as measured by the median error. This result is also partly due to the generally higher variability of errors in these models. In contrast, LightGBM shows a relatively large number of outliers (5.4 %), but the variability of errors for this model is low compared to other models. However, there exists a cluster of outlier error values around 8 % MAPE, caused mainly by autumn fluctuations. Unlike in production, summer for consumption is almost free of extremes. On the other hand, there is a noticeable overrepresentation of errors during the autumn months, even among otherwise well-performing models. In general, it can be said that all models struggle with autumn to varying degrees. The reason is most likely the difficult-to-capture behavioral change as winter approaches, where models respond with varying flexibility to changing conditions. This effect is particularly visible at the beginning of the workweek (generally the first day after a non-working day), especially for the Linear Small model and GRNN-type models, although Time GRNN, for example, does not have many outlier values. The start-of-week effect is less pronounced in spring, where the models are more successful in reducing the number of extremes. In this context, among the group of top-performing models, Time GRNN appears to be the best, while LightGBM performs relatively poorly. It should, of course, be noted that outliers defined by exceeding the IQR threshold may be difficult to compare due to differences in the variability of error values. Given these findings regarding the structure of outlier values, a sensitivity analysis related to the energy calendar was also conducted. It was found that models derived from GRNN are highly stable in this respect, including GRNN Random Forest, with only slight fluctuations observed for GRNN Boost – a behavior that can also be seen in the previously mentioned LightGBM model. This slight effect was particularly pronounced on days following holidays, typically Mondays, and seasonally during the autumn period. All these results are confirmed by the heatmaps in Figure 10. Although there is an overrepresentation of days following non-working periods among most GRNN models, as mentioned above, their increased sensitivity in this regard has not been confirmed. On the other hand, these figures show a subtle effect at the beginning of non-working periods. While this phenomenon occurs more frequently, the error fluctuations are less extreme than in the previous case, and these days therefore do not appear among the outlier observations. In general, however, there is a clearly visible issue with the transition between working days and non-working days and vice versa. This effect can be observed as particularly evident in the early morning hours, due to the pronounced change in consumption patterns — a phenomenon that is further intensified during the aforementioned autumn period. This effect is even more evident in the Linear Small model, which also shows greater error accumulation during nighttime hours, caused by the overestimation of consumption during that time. Overall, it can be concluded that the model with relatively good temporal behavior is LightGBM, which, although it exhibits several shortcomings, none of them are of a critical nature. Combined with its predictive performance for consumption, it can be designated as the winner of the evaluation. A relatively acceptable model is also the second one identified in the study of aggregated errors, Linear Big. Although this model shows a larger difference compared to the winning model in aggregated daily errors, it has a smaller number of outlier observations — a result, however, that is also influenced by greater variability associated with higher skewness. Its major disadvantage, on the other hand, lies in its sensitivity to temporal factors, manifesting both in short-term segments (days of the week) and across months. For the Time GRNN model to be considered acceptable, a significant improvement in prediction accuracy would be required, even though this model demonstrates a relatively good outlier structure. 5.3. Summary of results and discussion Across days and seasons, LightGBM has proven to be the most robust choice for both production and consumption, effectively capturing nonlinear relationships (particularly meteorological influences in the case of FVE) while requiring a relatively moderate degree of tuning. Within the short training window (21 days), it benefits from rich yet causally constructed feature engineering (lags, moving statistics, cyclic encoding, calendar, and meteorological variables). Within the GRNN family, the most successful variants were Time GRNN and GRNN Boost. Time GRNN, which employs a time-weighted distance metric, assigns greater importance to more recent samples and responds better to short-term regime shifts; GRNN Boost sequentially corrects residuals and improves the mean error without a dramatic increase in variance. In the prediction of photovoltaic production, these variants often represent practically viable alternatives to LightGBM, offering a reasonable compromise between median error and the stability of daily results. The LightGBM model even outperformed the ANN models designed as benchmarks with a significantly longer training window. Petkovová et al.: Preprint submitted to Elsevier Page 19 of 31 Short-term prediction of consumption and production of energy For consumption, both Time GRNN and GRNN Boost typically remain close to the linear baselines. This does not represent a significant improvement given the simplicity of the linear baseline. Unfortunately, the temporal stability of the GRNN variants is also not particularly good (for example, the Monday effect). Artificial neural networks (ANN) have a higher number of outliers, yet they show good performance in terms of relatively coherent results across different day types. However, their configuration in our protocol was advantaged by a longer training window, and they are therefore included here primarily as an additional benchmark. Penalized linear models remain useful due to their interpretability and solid performance, especially for consumption, despite their limitations in capturing sharp nonlinearities. This may suggest that, for this specific domain under the short training window setting, a relatively simple predictor would be the more suitable choice. The energy calendar (working and non-working days, indicators for Mondays and days following holidays) provides the greatest benefit for consumption, where it helps models to reflect recurring behavioral patterns. In the case of photovoltaic production (FVE), meteorology dominates – specifically irradiance, cloudiness, and temperature. The summer months exhibit higher daily variability of errors caused by rapid changes in cloud cover, whereas the winter period is more stable. A slight potential effect of the calendar on production predictions was also observed, particularly for the GRNN model variants. Although the subsequent sensitivity analysis did not confirm a significant effect, it might still be beneficial in the future to include the calendar in the prediction process. The existence of this dependency may stem, for example, from specific reconfigurations of FVE equipment or from dependencies in the predictions of exogenous variables. However, for the purposes of model comparison, the inclusion of this variable is not essential. The short training window (21 days) does not capture annual cycles or longer shifts, meaning that the results may differ when using a longer historical dataset. The meteorological data are available at an hourly granularity and were harmonized for alignment purposes (for example, using PCHIP/interpolation), which transfers part of the error directly into the production predictions; thus, the quality of the local weather forecast represents the upper bound (in terms of error) of achievable accuracy. During nighttime hours for FVE, post-processing (gating or clipping to non-negative values, or zeroing out values outside daylight hours) is necessary to prevent the model from generating positive values where, physically, no production occurs. The ANN regime with warm starts between windows improves performance but limits fair comparison with methods that do not transfer information. For some methods, particularly the decompositional ones, we observe “fat tails” in the error distributions; therefore, we emphasize medians and IQR rather than means. For GRNN, it is advisable to tune the temporal penalty 𝜆according to the season (higher in summer) to enable faster adaptation within Time GRNN, and to choose a conservative learning rate with a larger number of iterations for smoother residual correction in GRNN Boost; both approaches can also be combined. For short windows, conservative regularization (lower max_depth and num_leaves) and rich yet causally constructed feature engineering (lags 1–96, daily lags, 24-hour moving statistics, cyclic encoding) prove effective in boosting. If ANN models are to be used in production, it is appropriate either to formally acknowledge pre-training on a longer history (transfer learning) or to switch to a strict cold-start between windows; otherwise, they should remain as auxiliary benchmarks. In terms of metrics, RMSE or relative errors can be added for generation to compare scales, but the primary metric remains MAE. From the process perspective, there is potential in cloud nowcasting and multi-source meteorology; from the modeling perspective, we recommend experimenting with single-model multi-horizon learning and residual decomposition of daily versus intraday components. It would also be interesting to explore further combinations of ensemble methods with one of the strong winning approaches. 6. Conclusions In this study, we assessed families of methods for predicting electricity consumption and photovoltaic production (FVE). A key requirement of this research was the practical constraint of achieving high accuracy even for a limited training window size. The aim was to identify suitable prediction methods and compare their performance. The study described the following methods: LightGBM, variants of the GRNN model, variants of the Prophet model, linear models, and advantaged neural networks with a longer training window. Within the chosen protocol (21 days and 96 steps), LightGBM proved to be the most robust approach across both production and consumption. For photovoltaic production (FVE), Time GRNN and GRNN Boost have been shown to be a suitable pragmatic alternative, especially in situations where simplicity, lower sensitivity to hyperparameter tuning, or better control of daily error variability is desired. In addition to these models, ANN-based models were also studied, which were advantaged by being trained on a significantly longer window. Despite this comparative disadvantage, Petkovová et al.: Preprint submitted to Elsevier Page 20 of 31 Short-term prediction of consumption and production of energy LightGBM was able to predict the target variables with lower error or perform virtually indistinguishably from the long-window-trained ANNs. All three methods also exhibited fairly consistent sensitivity across seasons. For consumption, alongside LightGBM, the Linear Big model emerges as an interpretable compromise solution. As a possible extension, the application of boosting with strong regularization and rich feature engineering presents itself as a promising direction. A somewhat surprising result is that the entire GRNN methods family did not include strong performers in this domain. This study provides a practical guideline for comparing predictive methods in situations with a short training window. The proposed procedure demonstrates how to compare individual model errors for consumption and production, including the use of a series of statistical tests to evaluate significant differences and the specific examination of temporal effects within these time-dependent characteristics. Overall, it offers a comprehensive framework for selecting a method suitable for predicting these energy variables, particularly in situations with limited input data. Moreover, this procedure can also be applied to other domains where accurate prediction of time-dependent quantities is required. Looking ahead, future work could focus on enhancing the most promising models through strengthening techniques, such as employing ensemble approaches, potentially even combining models across different families. It would also be valuable to further investigate the distinct predictive characteristics of production versus consumption data. In specific applied settings, a natural extension would involve broadening the set of exogenous variables or improving their quality. Importantly, the proposed testing framework remains fully applicable to such extensions. References Aguilar Madrid, R., Molina, D., García, A., 2021. Short-term electricity load forecasting with machine learning methods. Information 12, 50. doi:10.3390/info12020050. Akhtar, S., Shahzad, S., Zaheer, A., Ullah, H.S., Kilic, H., Gono, R., Jasiński, M., Leonowicz, Z., 2023. Short-term load forecasting models: A review of challenges, progress, and the road ahead. Energies 16. URL: https://www.mdpi.com/1996-1073/16/10/4060, doi:10.3390/ en16104060. Ali, S., Bogarra, S., Riaz, M.N., Phyo, P.P., Flynn, D., Taha, A., 2024. From time-series to hybrid models: advancements in short-term load forecasting embracing smart grid paradigm. Applied Sciences 14, 4442. Armstrong, J.S., Collopy, F., 1992. Error measures for generalizing about forecasting methods: Empirical comparisons. International Journal of Forecasting 8, 69–80. doi:10.1016/0169-2070(92)90008-W. Bishop, C.M., 2006. Pattern Recognition and Machine Learning. Springer, New York. Breiman, L., 2001. Random forests. Machine Learning 45, 5–32. doi:10.1023/A:1010933404324. Challu, C., Olivares, K.G., Oreshkin, B.N., Garza Ramirez, F., Mergenthaler Canseco, M., Dubrawski, A., 2023. Nhits: Neural hierarchical interpolation for time series forecasting. Proceedings of the AAAI Conference on Artificial Intelligence 37, 6989–6997. URL: https: //ojs.aaai.org/index.php/AAAI/article/view/25854, doi:10.1609/aaai.v37i6.25854. Chapagain, K., Kittipiyakul, S., Kulthanavit, P., 2020. Short-term electricity demand forecasting: Impact analysis of temperature for thailand. Energies 13. URL: https://www.mdpi.com/1996-1073/13/10/2498, doi:10.3390/en13102498. Diebold, F.X., Mariano, R.S., 2002. Comparing predictive accuracy. Journal of Business & economic statistics 20, 134–144. Friedman, J.H., 2001. Greedy function approximation: A gradient boosting machine. Annals of Statistics 29, 1189–1232. doi:10.1214/aos/ 1013203451. Fritsch, F.N., Carlson, R.E., 1980. Monotone piecewise cubic interpolation. SIAM Journal on Numerical Analysis 17, 238–246. doi:10.1137/ 0717021. Goodfellow, I., Bengio, Y., Courville, A., 2016. Deep Learning. MIT Press. URL: https://www.deeplearningbook.org/. Hassani, H., Silva, E.S., 2015. Forecasting with big data: A review 2, 5–19. URL: https://doi.org/10.1007/s40745-015-0029-9, doi:10.1007/s40745-015-0029-9. He, K., Zhang, X., Ren, S., Sun, J., 2015. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification, in: Proceedings of the IEEE International Conference on Computer Vision (ICCV), pp. 1026–1034. doi:10.1109/ICCV.2015.123. Hooshmand, A., Sharma, R., 2019. Energy predictive models with limited data using transfer learning, in: Proceedings of the Tenth ACM International Conference on Future Energy Systems, Association for Computing Machinery, New York, NY, USA. p. 12–16. URL: https: //doi.org/10.1145/3307772.3328284, doi:10.1145/3307772.3328284. Hornik, K., 1991. Approximation capabilities of multilayer feedforward networks. Neural Networks 4, 251–257. Hyndman, R.J., Athanasopoulos, G., 2018. Forecasting: Principles and Practice. 2nd ed., OTexts. URL: https://otexts.com/fpp2/. Ioffe, S., Szegedy, C., 2015. Batch normalization: Accelerating deep network training by reducing internal covariate shift, in: Proceedings of the 32nd International Conference on Machine Learning, pp. 448–456. Ke, G., Meng, Q., Finley, T., Wang, T., Chen, W., Ma, W., Ye, Q., Liu, T.Y., 2017. Lightgbm: a highly efficient gradient boosting decision tree, in: Proceedings of the 31st International Conference on Neural Information Processing Systems, Curran Associates Inc., Red Hook, NY, USA. p. 3149–3157. Kingma, D.P., Ba, J., 2015. Adam: A method for stochastic optimization, in: International Conference on Learning Representations (ICLR). URL: https://arxiv.org/abs/1412.6980. López, A., Ramos, P., Garcia, J., 2022. Automatic classification of special days for short-term load forecasting. Electric Power Systems Research 202, 107626. doi:10.1016/j.epsr.2021.107533. Petkovová et al.: Preprint submitted to Elsevier Page 21 of 31 Short-term prediction of consumption and production of energy Mamun, A.A., Sohel, M., Mohammad, N., Haque Sunny, M.S., Dipta, D.R., Hossain, E., 2020. A comprehensive review of the load forecasting techniques using single and hybrid predictive models. IEEE Access 8, 134911–134939. doi:10.1109/ACCESS.2020.3010702. Menculini, L., Marini, A., Proietti, M., Garinei, A., Bozza, A., Moretti, C., Marconi, M., 2021. Comparing prophet and deep learning to arima in forecasting wholesale food prices. Forecasting 3, 644–662. URL: https://www.mdpi.com/2571-9394/3/3/40, doi:10.3390/ forecast3030040. Olivares, K.G., Challu, C., Marcjasz, G., Weron, R., Dubrawski, A., 2023. Neural basis expansion analysis with exogenous variables: Forecasting electricity prices with nbeatsx. International Journal of Forecasting 39, 884–900. doi:10.1016/j.ijforecast.2022.03.001. Pierre, A.A., Akim, S.A., Semenyo, A.K., Babiga, B., 2023. Peak electrical energy consumption prediction by arima, lstm, gru, arima-lstm and arima-gru approaches. ENERGIES 16. doi:10.3390/en16124739. Shaffer, J.P., 1995. Multiple hypothesis testing. Annual review of psychology 46, 561–584. Shering, T., Alonso, E., Apostolopoulou, D., 2024. Investigation of load, solar and wind generation as target variables in lstm time series forecasting, using exogenous weather variables. Energies 17. URL: https://www.mdpi.com/1996-1073/17/8/1827, doi:10.3390/en17081827. Silverman, B.W., 1986. Density Estimation for Statistics and Data Analysis. Chapman and Hall, London. doi:10.1201/9781315140919. Specht, D.F., 1991. A general regression neural network. IEEE Transactions on Neural Networks 2, 568–576. doi:10.1109/72.97934. Srivastava, N., Hinton, G., Krizhevsky, A., Sutskever, I., Salakhutdinov, R., 2014. Dropout: a simple way to prevent neural networks from overfitting. J. Mach. Learn. Res. 15, 1929–1958. Taylor, S.J., Letham, B., 2018. Forecasting at scale. The American Statistician 72, 37–45. doi:10.1080/00031305.2017.1380080. Zhang, G., Patuwo, B.E., Hu, M.Y., 1998. Forecasting with artificial neural networks: The state of the art. International Journal of Forecasting 14, 35–62. doi:10.1016/S0169-2070(97)00044-7. Zhou, Z.H., 2021. Ensemble Methods: Foundations and Algorithms. Chapman and Hall/CRC. Ziel, F., 2018. Modeling public holidays in load forecasting: A german case study. Journal of Modern Power Systems and Clean Energy 6, 242–253. doi:10.1007/s40565-018-0385-5. Petkovová et al.: Preprint submitted to Elsevier Page 22 of 31 Short-term prediction of consumption and production of energy Figure 5: Representation of daily extremes for individual models and seasons for photovoltaic production (MAE). (A) The percentage occurrence of daily extremes for each model, divided according to their occurrence in individual seasons. (B) Representation of the occurrence of extremes by showing the excess occurrence in a given season compared to the expected value. Figure 6: Representation of daily extremes for individual models and seasons for consumption (MAPE). (A) The percentage occurrence of daily extremes for each model, divided according to their occurrence in individual seasons. (B) Representation of the occurrence of extremes by showing the excess occurrence in a given season compared to the expected value. Figure 7: Representation of daily extremes for individual day types (according to the energy calendar) for photovoltaic production (MAE). (A) The percentage occurrence of daily extremes for each model, divided according to their occurrence in individual day types. (B) Representation of the occurrence of extremes by showing the excess occurrence in a given day type compared to the expected value. Petkovová et al.: Preprint submitted to Elsevier Page 23 of 31 Short-term prediction of consumption and production of energy Figure 8: Representation of daily extremes for individual day types (according to the energy calendar) for consumption (MAPE). (A) The percentage occurrence of daily extremes for each model, divided according to their occurrence in individual day types. (B) Representation of the occurrence of extremes by showing the excess occurrence in a given day type compared to the expected value. Petkovová et al.: Preprint submitted to Elsevier Page 24 of 31 Short-term prediction of consumption and production of energy Figure 9: Evaluation of the stability of daily aggregated errors of selected models over time for photovoltaic production (MAE). The selected models are LightGBM (A,B), Time GRNN (C,D), GRNN Boost (E,F), and Linear Small (G,H). The left column shows the median value of the corresponding errors for each given day (horizontal axis) and each fifteen-minute interval (vertical axis). The right column shows the corresponding production MAE for a specific day of the year (within the studied interval) and a specific fifteen-minute interval of the day. Petkovová et al.: Preprint submitted to Elsevier Page 25 of 31 Short-term prediction of consumption and production of energy Figure 11: Analysis of the change in the median of consumption after removing the results for specific day types (according to the energy calendar) for individual models. The models are ordered according to the results of the Friedman test. Figure 12: Analysis of the change in the median of production after removing the results for specific day types (according to the energy calendar) for individual models. The models are ordered according to the results of the Friedman test. Petkovová et al.: Preprint submitted to Elsevier Page 32 of 31 Short-term prediction of consumption and production of energy Figure 13: Distribution of daily production errors (MAE) by days of the week for individual models, distinguished by color. The models are ordered alphabetically. Figure 14: Distribution of daily consumption errors (MAPE) by days of the week for individual models, distinguished by color. The models are ordered alphabetically. Petkovová et al.: Preprint submitted to Elsevier Page 33 of 31 Short-term prediction of consumption and production of energy Figure 15: Distribution of daily production errors (MAE) by calendar months for individual models, distinguished by color. The models are ordered alphabetically. Figure 16: Distribution of daily consumption errors (MAPE) by calendar months for individual models, distinguished by color. The models are ordered alphabetically. Petkovová et al.: Preprint submitted to Elsevier Page 34 of 31