Skip to Content
EnergiesEnergies
  • Article
  • Open Access

27 February 2026

28 Pages

Forecast of Electric Power Consumed by Public Buildings: Univariate and Multivariate Approaches Based on Quantile Regression Models

,
,
,
and
1
Department of Electrical and Information Engineering, University of Cassino and Southern Lazio, 03043 Cassino, Italy
2
Faculty of Engineering, Università Campus Bio-Medico di Roma, 00128 Rome, Italy
3
Department of Engineering, University of Napoli Parthenope, 80133 Naples, Italy
*
Author to whom correspondence should be addressed.

Abstract

Load forecasting has become a key tool, especially for distribution system operators, to ensure optimal grid management and control. In recent years, attention has shifted toward probabilistic load forecasting (PLF), as it can model forecast uncertainty. Because electricity demand is strongly influenced by time-dependent factors such as seasonal patterns and daily habits, non-parametric PLF methods are particularly suitable because they make no assumptions about the distribution of variables. This study focuses on quantile regression (QR), a widely studied non-parametric PLF technique that models forecast uncertainty by only assuming a linear dependency among variables. It is applied every hour to forecast the daily consumption of three large public buildings—an elderly healthcare center, a biomedical research facility, and a polyclinic—with different demand variability profiles. Forecasts are carried out using real-world consumption data and evaluated considering both univariate and multivariate approaches. The performance of both QR approaches is rigorously evaluated against that of two persistence-based methods through standard evaluation metrics. For the univariate case, two aggregation levels are considered: single buildings and aggregation of buildings. The results confirm the effectiveness of both uQR and mQR, which consistently outperform persistence-based benchmarks. In terms of the pinball loss (PL) function, the QR approaches exhibit values ranging from 1% to 1.8% across all case studies. Both approaches demonstrate reliable and sharp prediction intervals (PIs); for example, for the PI(10–90) using the uQR, the PI coverage probability (PICP) ranges from 0.78 to 0.89 and the PI normalized average width (PINAW) from 0.09 to 0.26. Overall, uQR achieves lower PL, whereas mQR yields slightly better PICP and PINAW results for the building characterized by an irregular and unpredictable consumption profile.

1. Introduction

1.1. Background and Motivation

The high variability and intermittency of electric loads and distributed energy resources can significantly affect the proper operation of smart distribution grids, leading to imbalances between power supply and demand [1,2,3]. Against this backdrop, forecasting techniques have become indispensable, as more accurate predictions enable distribution system operators to manage and control smart distribution grids more effectively.
Within this broad field, LF assumes a central role, providing a key means of quantifying both electricity consumption and demand-side flexibility [4]. Accurate forecasts not only support the implementation of robust demand response programs that aid efficient, secure, and reliable grid operation [5] but also drive the development and integration of local flexibility markets [6,7], thereby enhancing the technical and economic efficiency of the entire system.
Historically, LF in distribution systems was conducted at high levels of aggregation (e.g., substation level) due to limitations in the availability and granularity of measurement data. Today, the widespread deployment of smart meters across distribution networks enables the collection of vast amounts of data with high temporal resolution (e.g., hourly measurements) and fine spatial granularity, covering not only aggregated levels (e.g., primary and secondary substations) but also disaggregated levels (e.g., individual end-users) [8,9]. This wealth of fine-grained data has opened up new approaches, such as the hierarchical LF. It consists of forecasting loads at both aggregated and disaggregated levels while satisfying the principle of consistency among aggregation and improving the accuracy of base forecasts [10,11,12].
Electricity demand is known to be strongly influenced by exogenous factors such as weather conditions and socio-economic variables, including holidays, weekdays, and extraordinary events (e.g., the COVID-19 pandemic). In this context, an emerging research direction is text-based forecasting, which leverages textual data—such as word frequencies, sentiment indicators, topic distributions, and word embeddings—as a primary information source to improve demand prediction. Textual information is transformed into numerical values and integrated into forecasting models to enhance their predictive performance [13,14].
The predominance of deterministic forecasting methods, even within these recently developed research streams, limits a comprehensive assessment of forecasting uncertainty. Consequently, increasing attention has recently been devoted to PLF approaches, which explicitly account for uncertainty and are therefore particularly well suited to address the management and control challenges of future smart grids. Despite recent advances in this field, PLF remains an open research area, with several aspects still requiring investigation, such as: developing interpretable probabilistic methods suitable for operational deployment beyond mere prediction; exploiting information from additional electrical predictors; establishing accurate and calibrated probabilistic models across various temporal and spatial scales; and developing strategies for the optimal selection of hyperparameters.

1.2. Related Literature

LF techniques are commonly classified into three main groups: statistical, artificial intelligence and hybrid. Statistical methods (e.g., regression analysis and time-series models) leverage historical observations to infer, model and forecast the stochastic dynamics of physical phenomena, typically via mathematical formulations that characterize the underlying variables of interest [15,16]. They are often straightforward and computationally efficient, but they require expertise and may struggle to capture complex nonlinear dependencies. AI methods (e.g., support vector machines and deep neural networks) extract complex patterns from historical time-series data without relying on explicit mathematical models [17,18,19,20]. Their effectiveness is enhanced by open-source software, which reduces computational costs. Nevertheless, the limited interpretability remains a key barrier to broader adoption. Hybrid approaches exploit heterogeneous methods to enhance the robustness and accuracy of the resulting forecasts. For example, a statistical model can capture the linear components of the load, while an AI model predicts the residual nonlinear part [21]. Moreover, statistical techniques can assist AI in data preprocessing and help reduce overfitting [22]. However, these approaches may entail a high computational burden. Brief literature reviews highlighting the key points of the various methods are reported in [20,23]. In the following, attention is focused on statistical approaches, as energy system applications (TSOs, DSOs and electricity markets) require forecasts that are transparent, interpretable and easily justifiable to non-technical stakeholders. Statistical models explicitly capture the effects of exogenous variables, enable structured what-if analyses and provide probabilistic outputs that can be readily validated and certified.
When statistical methods are applied to PLF, two widely used approaches can be distinguished: parametric and non-parametric methods.
In parametric methods, the PDFs of the random variables are assumed to belong to known classes of distributions, and their statistical parameters are usually estimated using optimization techniques. In [24], a Gaussian mixture distribution is applied to model residential loads. In [25], a parametric probabilistic model for hourly forecasting of the consumption of a small town in the north of Spain is enhanced; a multi-objective genetic algorithm is used to select relevant explanatory variables, linearly combined to predict the PDF parameters; the procedure also determines the most appropriate distribution among those characterized by two parameters. In [26], the traditionally used normal distributions are enriched with a four-parameter SHASH distribution family, whose parameters are evaluated by applying the MDN model to forecast the load absorbed by four Chilean substations. Despite offering an excellent trade-off between statistical rigor, interpretability, and operational efficiency, such methods may be ill-suited for PLF, as electricity demand is inherently time-dependent and strongly shaped by seasonal variations and daily consumption patterns, raising concerns about the validity of the underlying distributional assumptions [27]. This limitation has motivated the adoption of non-parametric PLF approaches, which forego assumptions regarding underlying PDFs, providing a more versatile and adaptable forecasting framework.
Among the most widely adopted non-parametric statistical approaches for PLF are KDE and QR. KDE directly estimates the PDF of the target variable by placing a smooth “bump” (kernel) over every data point and summing them together, with the bandwidth parameter determining the width and smoothness of those bumps. In [28], a PDF forecasting method centered on Gaussian KDE is proposed for the highly accurate short-term forecasting of the load absorbed by the city of Ottawa (Canada). In [29], QR is firstly applied to generate individual forecasts; then, the KDE is used to transform the discrete quantiles into continuous PDFs; eventually, a perturbation search method is applied to determine the optimal weighted combination of the PDFs. The accuracy of KDE is highly sensitive to bandwidth selection to avoid overfitting or oversmoothing while also contending with high computational overhead, the curse of dimensionality and inherent boundary bias.
QR directly estimates quantiles by modeling the dependence between the target variable and a set of regressors as a linear combination, whose coefficients are evaluated by minimizing the sum of the PL function; this approach, while computationally intensive, is robust to outliers prone to the problem of quantile crossing, necessitating postprocessing to maintain the logical ordering of the estimated quantiles [30]. In [31], a multivariate QR approach for PLF, which addresses active and reactive power simultaneously, is proposed and applied to a real-world Italian factory. A study of 100 real LV feeders [32] showed that QR—while not always the optimal model—consistently delivers competitive performance, serving as a robust benchmark for PLF. However, the linear model structure of QR restricts its capacity to capture nonlinearities or complex feature interactions. This structural limitation can result in reduced predictive accuracy when modeling intricate patterns. Consequently, exploring more robust QR frameworks is essential. For instance, in [33], a QR averaging method is used to decompose complex nonlinearities into a series of linear problems; however, this approach necessitates generating multiple forecasts, significantly increasing computational overhead and iteration time. A reasonable classification of QR-based probabilistic forecasting methods is found in [34]. An alternative and simple approach is to adequately select specific factors during the preliminary analysis phase.
More recently, a method based on EC was introduced within this framework [35,36]. It achieves slightly higher accuracy than QR due to the absence of assumptions regarding linear relationships between variables; however, despite its versatility and strong performance across different aggregation levels, the model’s complexity increases exponentially with the number of regressors, leading to a computational effort that is significantly higher than that of QR-based approaches.

1.3. Research Objectives and Contributions

In this study, a non-parametric, data-driven PLF framework based on QR is proposed to predict the electrical power consumption of public buildings. In contrast to the prevailing literature, which largely relies on AI and machine learning techniques, the proposed framework is built upon two QR-based models. This methodological shift is motivated by the fundamentally different objectives of these research streams:
  • AI-driven approaches [37,38,39,40] that explicitly model seasonality (e.g., daytime, weekend, month); weather conditions (e.g., solar radiation, outdoor temperature); and building characteristics (e.g., the number of rooms in residential buildings and occupancy patterns enabled by advanced sensing infrastructures) become more important when forecasting is carried out at disaggregated levels. In this case, the main aim is to improve building-level energy efficiency and flexibility through BEMS. Conversely, the proposed QR-based approaches adopt a power-system perspective tailored to smart-grid applications, such as RECs. In these contexts, where the aggregation of electrical loads and DERs plays a central role, the proposed framework provides robust uncertainty quantification, thereby supporting high-accuracy dispatch planning and operational decision making.
  • Furthermore, although QR may yield limited predictive accuracy when strong temporal linear dependencies are present, a careful preliminary analysis of the time-series data is conducted to identify and select only the most informative regressors. This strategy avoids unnecessary model complexity that does not translate into accuracy improvements while ensuring limited computational effort.
Specifically, this study extends the deterministic forecasting approach presented in [41] to a probabilistic framework and expands the empirical analysis from one (i.e., the university research facility named PRABB) to two other public buildings at the University Campus Bio-Medico of Rome, all involved in a REC [42]: an elderly care home (i.e., CESA) and a hospital (i.e., POLY). Two QR techniques are employed for PLF, that are the uQR and the mQR approaches. The uQR model is conventionally used to generate predictive quantiles of the power absorbed by each building based on its own historical consumption data and weather-related information. In contrast, extending and improving the approach proposed in [31], a novel mQR is developed to generate predictive quantiles of the power absorbed by each building by exploiting exogenous electrical predictors (i.e., the hourly power consumption of neighboring buildings) in order to capture residual mutual information between the target variables and enhance forecasting accuracy. Several numerical simulations are performed, considering consumption variability (i.e., regular and highly variable power consumption) and load aggregation levels (single building and aggregated buildings). Numerical simulations are conducted over a 24 h forecasting horizon using a rolling-origin scheme with a 1 h update and 24 lead times. Different consumption variability levels of real-world public buildings are considered, ranging from regular demand profiles (e.g., CESA) to highly variable ones (e.g., POLY). The proposed approaches are benchmarked against two persistence methods, and the resulting prediction bounds are analyzed for both aggregated loads and for the sum of disaggregated forecasts.
In summary, the proposed approach offers the following contributions and merit:
  • The QR model focuses on a two-phase linear multivariate PLF and adopts a critical parameters estimation analysis to avoid the need for linear programming optimization.
  • It demonstrates the effectiveness of incorporating exogenous electrical predictors into QR models for the PLF of public buildings.
  • It introduces novel, detailed algorithms for training and test processes for mQR models.
  • The data-driven methodology is validated on a real-world case study, providing highly accurate forecasts across different levels of aggregation.
The rest of this paper is organized as follows: Section 2 formalizes the forecast problem; Section 3 details the proposed forecasting method; Section 4 illustrates the obtained results on the three public building datasets; and Section 5 provides a final discussion.

2. Forecasting Problem Formulation

The proposed approach consists of five basic steps, which are outlined below and summarized in Figure 1.
Figure 1. Forecasting problem formulation.
1.
Problem definition: This identifies the following:
  • The target variable:
    –
    For the uQR, it is the real-world hourly power consumption of a public building at time t; it is defined as Y i u with i = 1 , … , N B ;
    –
    For the mQR, it is the real-world hourly power consumption of N B public buildings at time t; it is defined as Y m = Y 1 u , … , Y N B u .
  • The external variables:
    –
    For the uQR, they are the weather information (i.e., external temperature, humidity, and solar radiation); they are defined as J i , 1 u , … , J i , N E i u with i = 1 , … , N B ;
    –
    For the mQR, they are the weather information (i.e., external temperature, humidity and solar radiation) and the real-world hourly power consumed by the neighboring buildings; they are defined as J i , 1 m , … , J i , N E i m for each Y i u with i = 1 , … , N B .
  • The temporal boundaries: forecasts are generated using a rolling origin time (i.e., the origin time advances hourly) to provide 24 lead times.
2.
Data gathering and preprocessing: Forecasting is based on historical time-series power consumption data, collected in a private or public dataset, as well as on historical or prediction weather information, available on open-source websites. Prior to use, power consumption data require postprocessing through a filtering analysis, which consists of identifying anomalies (e.g., missing, duplicated, or erroneous values) and replacing or removing them from the time series.
3.
Preliminary analysis: This involves selecting the regressors, which in turn determine the choice of forecasting models. Prior to this, the dataset of input variables is divided into training and test subsets; the preliminary analysis is restricted exclusively to the training data. This critical process involves the following:
  • Data observation: This denotes the process of identifying seasonal patterns in the dataset of the target variable on both weekly and daily horizons; this step enables the definition of separate forecasting models for WDs and N-WDs.
  • Autocorrelation analysis: This describes the strength of the linear relationship between the univariate target variable and its lagged values; it is quantified by the autocorrelation coefficient, ρ . The endogenous regressors are as follows:
    –
    For uQR, they are lagged values with ρ higher than a threshold set empirically (e.g., ρ > 0.7).
    –
    For mQR, they are lagged values selected using the same criteria as for uQR. This choice is required by the two-phase procedure of the mQR, as described in the following section: the first phase requires the application of the uQR model for each univariate target variable; then, the outputs of the first phase are used in the second phase as inputs of the mQR model. The autocorrelation analysis aims to select the endogenous regressors for the uQR stage.
  • Correlation analysis: This quantifies the strength of the linear relationship between the univariate target variable and external variables; this relationship is defined with the correlation coefficient, r. The exogenous regressors are as follows:
    –
    For the uQR, they are the weather information with r higher than a threshold set empirically (i.e., | r | > 0.5).
    –
    For the mQR, they are the weather information with r higher than a threshold set empirically (i.e., | r | > 0.5), and the lagged values of power consumed by the other buildings (i.e., N B − 1) with r higher than a threshold set empirically (e.g., r > 0.6). As previously stated, the correlation analysis aims to select the exogenous regressors for the uQR phase.
At the end of this process, for both WDs and N-WDs,
  • For the uQR, the endogenous and the exogenous regressors are defined as X i , 1 u , … , X i , N i u u for each Y i u with i = 1 , … , N B ;
  • For the mQR, the endogenous and exogenous regressors are defined as X i , 1 u m , … , X i , N i u m u m for each Y i u with i = 1 , … , N B .
4.
Choosing and fitting the model: The method adopted to perform PLF is the QR, which directly calculates the quantiles of the target variable using a linear combination of the endogenous and exogenous regressors. Two QR approaches are applied:
  • The uQR: It consists of forecasting the α q -quantile Y ^ i u α q of Y i u given N i u regressors X i , 1 u , … , X i , N i u u with i = 1 , … , N B .
  • The mQR: It consists of forecasting the α q -quantile Y ^ m α q of Y m given N m regressors Y ^ 1 u m , … , Y ^ N B u m , with Y ^ i u m = Y ^ i u m α 1 , … , Y ^ i u m α Q u m for i = 1 , … , N B . Such regressors are the Q u m forecasted quantiles of the N B univariate target variables, obtained by applying for Y i u the u Q R m (i.e., uQR in the mQR framework) given as regressors X i , 1 u m , … , X i , N i u m u m for i = 1 , … , N B .
The fitting model consists of estimating the parameters of the chosen model. Such estimation is performed exclusively on the training subset, which is composed of 80% of the available data. This process is as follows:
  • For the uQR, it consists of estimating the parameters β i u α q = β i , 1 u α q , … , β i , N i u u α q for each Y i u with i = 1 , … , N B . This process is performed using the following training subset: M t r u = { y i u v , x i , 1 u v , … , x i , N i u u v } for v = 1 , … , M t r u and i = 1 , … , N B .
  • For the mQR, it consists of three steps: first, the uQR m model is trained; then, the uQR m is applied to forecast the Q u m forecasted quantiles of the N B univariate target variables; and finally, the mQR model is trained. In other words, two fitting processes are required, each performed using a distinct training subset:
    –
    For the u Q R m , the parameters of the model, β i u m α ℓ = β i , 1 u m α ℓ , … , β i , N i u m u m α ℓ , are estimated using a training subset consisting of 60% of the available data, defined as M t r u m = { y i u v , x i , 1 u m v , … , x i , N i u m u m v } for v = 1 , … , M t r u m and i = 1 , … , N B .
    –
    For the mQR, the parameters of the model, β m α q = β 1 m α q , … , β N B m α q with β i m α q = β i m α 1 , … , β i m α Q u m for i = 1 , … , N B , are estimated using a training subset consisting of 20% of the available data, defined as M t r m = y i u k , y ^ i u m k α 1 , … , y ^ i u m k α Q u m for k = M t r u m + 1 , … , M t r m and i = 1 , … , N B .
5.
Forecasting accuracy evaluation: This involves the evaluation of performance metrics, which is performed exclusively on the test subset. Such a subset is composed of the remaining 20% of the available data and is defined as M t x u = { y i u w , x i , 1 u w , … , x i , N i u u w } for w = M t r u + 1 , … , M t x u and i = 1 , … , N B for the uQR, and M t x m = { y i u w , y ^ i u m w α q , … , y ^ i u m w α Q m for w = M t r u m + 1 , … , M t x m and i = 1 , … , N B for the mQR. In the PLF framework, for each Y i u with i = 1 , … , N B , the forecasting accuracy is evaluated with the following:
  • PL function: This analyzes the difference between the real observation y i u w and the forecasted α q -quantile ( y ^ i u w ) α q and then penalizes underestimation y i u w > ( y ^ i u w ) α q and overestimation y i u w < ( y ^ i u w ) α q asymmetrically depending on the order of quantile α q . For a given α q -quantile, the PL function is described as follows:
    ( PL w ) α q = y i u w − ( y ^ i u w ) α q α q − 1 { ( y i u w ≤ ( y ^ i u w ) α q }
    where 1 ( · ) is the indicator function (it is equal to 1 if the condition in the brackets is true; otherwise, it is equal to 0). If α q > 0.5 , the PL gives a high penalty for underestimation; if α q < 0.5 , the PL gives a high penalty for overestimation; and if α q = 0.5 , the PL is similar to an absolute error. A low PL indicates a better forecast because it indicates that y i u w and ( y ^ i u w ) α q are very close.
  • PICP: This describes the probability that the real observation y i u w lies within the PI. Given M t x test data (i.e., M t x u for uQR and M t x m for mQR), the PICP is described as follows:
    PICP = 1 M t x ∑ w = 1 M t x 1 { ( y ^ i u w ) α l ≤ y i u w ≤ ( y ^ i u w ) α u }
    where α u and α l are the upper and lower bounds of the PI. A low PICP indicates that the PI is too narrow (i.e., the forecasting model is underestimating), while a high PICP suggests the opposite. Ideally, the PICP should match the nominal confidence level of the PI (e.g., PICP = 0.8 for PI with limits α u = 90 and α l = 10).
  • PINAW: This quantifies the average width of PIs normalized by the range of real observations. Given M t x test data (i.e., M t x u for uQR and M t x m for mQR), the PINAW is described as follows:
    PINAW = 1 M t x ∑ w = 1 M t x ( y ^ i u w ) α u − ( y ^ i u w ) α l y i , m a x u w − y i , m i n u w
    where y i , m a x u w and y i , m i n u w are the maximum and the minimum real observations. A low PINAW suggests tighter and more confident forecasts, reflecting how precise the PIs are.

3. Forecasting Approaches

This section details the modeling and algorithms for both the uQR and mQR approaches. For the sake of simplicity and without loss of generality, both are formulated at a given time step t, with the subscript t omitted.

3.1. Modeling

3.1.1. Univariate Approach

The forecast of α q -quantile of Y i u is as follows:
( y ^ i u ) α q = x i u ( β i u ) α q
where:
  • x i u = x i , 1 u , … , x i , N i u u is the ( 1 × N i u ) vector of the measurements of regressors;
  • ( β i u ) α q = ( β i , 1 u ) α q , … , ( β i , N i u u ) α q T is the ( N i u × 1 ) vector of the estimated parameters.
The estimation of the parameters ( β i u ) α q in (4) is performed by minimizing the PL function over the training dataset M t r u according to the following:
( β i u ) α q = arg min ( β i u ) α q 1 α q − 1 { y i u t r ≤ ( y ^ i u t r ) α q } ⊙ y i u t r − ( y ^ i u t r ) α q 1
where:
  • y i u t r = y i u 1 , … , y i u M t r u T is the ( M t r u × 1 ) vector of measurements of Y i u in the M t r u dataset;
  • ( y ^ i u t r ) α q is the ( M t r u × 1 ) vector of the forecasted α q -quantile of Y i u ; it is evaluated by applying the forecasting model (4) over the M t r u data, so that the following is true:
    ( y ^ i u t r ) α q = x i u t r ( β i u ) α q
    where x i u t r is the ( M t r u × N i u ) matrix of the measurements of regressors in the training dataset, defined as follows:
    x i u t r = x i , 1 u 1 … x i , N i u u 1 ⋮ ⋱ ⋮ x i , 1 u v … x i , N i u u v ⋮ ⋱ ⋮ x i , 1 u M t r u … x i , N i u u M t r u

3.1.2. Multivariate Approach

Hereafter, for the sake of simplicity, the mQR approach is formulated for N B target variables and without weather information variables.
The forecast of the α q -quantile of Y m is as follows:
( y ^ m ) α q = y ^ u m ( β m ) α q
where:
  • [ y ^ u m ] is the ( N B × N B · N m ) matrix of the regressors, with N m = N B · Q u m ; this matrix has a block-diagonal structure such that the following is true:
    y ^ u m = y ^ 1 u m , … , y ^ N B u m … 0 ⋮ ⋱ ⋮ 0 … y ^ 1 u m , … , y ^ N B u m
    where the diagonal elements are the ( 1 × N m ) vector of the Q u m forecasted quantiles of the N B univariate target variables, with y ^ i u m = y ^ i u m α 1 , … , y ^ i u m α Q u m for i = 1 , … , N B , and the off-diagonal elements are the ( 1 × N m ) vector of null elements.
  • ( β m ) α q = ( β 1 m ) α q , … , ( β N B m ) α q T is the ( N m × 1 ) vector of the estimated parameters, with ( β i m ) α q = ( β i m ) α 1 , … , ( β i m ) α Q u m T for i = 1 , … , N B .
The estimation of the parameters ( β i m ) α q in (8) involves a three-step process: first, the u Q R m is trained for each univariate target variable; then, it is applied to forecast the Q u m forecasted quantiles of the N B univariate target variables; finally, the outputs of the second step are used to train the mQR model.
Step 1: It consists of estimating the parameters ( β i u m ) α ℓ of the u Q R m model. Such parameters ( β i , 1 u m ) α ℓ , … , ( β i , N i u m u m ) α ℓ are estimated by minimizing the PL function in (5) over the training dataset M t r u for i = 1 , … , N B .
Step 2: It consists of forecasting the Q u m quantiles of the N B univariate target variables y ^ i u m t r α ℓ for i = 1 , … , N B over the M t r m dataset. Such forecasted quantiles y ^ i u m 1 α ℓ , … , y ^ i u m M m t r α ℓ are obtained by applying (4) given the measurements of regressors x i , 1 u m , … , x i , N i u m u m and the parameters ( β i u m ) α ℓ estimated in Step 1 for i = 1 , … , N B and ℓ = 1 , … , Q u m .
Step 3: It consists of estimating the parameters ( β m ) α q of the mQR model. Such parameters ( β 1 m ) α q , … , ( β N B m ) α q are estimated by minimizing the sum of the N B PL functions over the training dataset M t r m according to the following:
( β m ) α q = arg min ( β m ) α q ∑ i = 1 N B 1 α q − 1 { y i m t r ≤ ( y ^ i m t r ) α q } ⊙ y i m t r − ( y ^ i m t r ) α q 1
where:
  • y i m t r = y i u 1 , … , y i u M t r m T is the ( M t r m × 1 ) vector of measurements of Y i for i = 1 , … , N B in the training dataset M t r m ;
  • ( y ^ i m t r ) α q is the ( M t r m × 1 ) vector of the forecasted α q -quantile of Y m ; it is evaluated by applying the forecasting model (8) over the M t r m data for each univariate target variable, so that the following is true:
    ( y ^ i m t r ) α q = y ^ i u m t r ( β i m ) α q
    where y ^ i u m t r is the ( M t r m × · N m ) matrix of regressors, which is composed of the Q u m forecasted quantiles of the N B univariate target variables predicted over the training dataset M t r m in Step 2, defined as follows:
    y ^ i u m t r = y ^ i u m 1 α 1 … y ^ i u m 1 α Q u m ⋮ ⋱ ⋮ y ^ i u m M m t r α 1 … y ^ i u m M m t r α Q u m

3.2. Algorithm

3.2.1. Univariate Approach

The algorithm of the uQR approach is applied to Y i u with i = 1 , … , N B . For the i-th univariate target variable, it consists of the following three phases:
  • Phase 1: Parameter estimation.
  • Phase 2: Forecast evaluation.
  • Phase 3: Accuracy evaluation.
The details of each phase are presented below, followed by a flowchart in Figure 2 and the corresponding pseudocode in Algorithm 1.
Figure 2. Flowchart of the uQR approach.
Phase 1: Estimation of the vector of parameters β i u α q for q = 1 , … , Q u .
i.
Extract the vector of measurements of the univariate target variable y i u t r and the matrix of the measurements of regressors x i u t r (defined in (7)) from the M t r u dataset.
ii.
Express the vector of the α q forecasted quantile of the univariate target variable y ^ i u t r α q as a function of the vector of parameters β i u α q by applying (6).
iii.
Estimate the vector of parameters β i u α q by solving the optimization problem in (5), which minimizes the PL function calculated using the vectors y i u t r and y ^ i u t r α q introduced above.
Algorithm 1: Pseudocode of the uQR approach.
begin
for i = 1 to N B
Phase 1: Parameter estimation
for v = 1 to M t r u
save y i u v and x i , 1 u v , … , x i , N i u u v
end
for q = 1 to Q u
define y ^ i u t r α q = x i u t r β i u α q
solve β i u α q = arg min ( β i u ) α q 1 α q − 1 y i u t r ≤ y ^ i u t r α q ⊙ y i u t r − y ^ i u t r α q 1
end
Phase 2: Forecast evaluation
for w = 1 to M t x u
save x i u w = x i , 1 u w , … , x i , N i u u w
for q = 1 to Q u
y ^ i u w α q = x i u w β i u α q ← forecasted quantile
end
end
Phase 3: Accuracy evaluation
define α u and α l
for w = 1 to M t x u
for q = 1 to Q u
P L u w α q = y i u w − y ^ i u w α q α q − 1 y i u w ≤ y ^ i u w α q
end
P I C P ′ = P I C P ′ + 1 y ^ i u w α l ≤ y i u w ≤ y ^ i u w α u
P I N A W ′ = P I N A W ′ + y ^ i u w α u − y ^ i u w α l y i , m a x u w − y i , m i n u w
end
P I C P = P I C P ′ M t x u
P I N A W = P I N A W ′ M t x u
end
Phase 2: Forecast of the α q -quantile of the univariate target variable y ^ i u w α q for q = 1 , … , Q u and w = 1 , … , M t x u .
i.
Extract the vector of measurements of regressors x i u w = x i , 1 u w , … , x i , N i u u w from the M t x u dataset.
ii.
Forecast the α q -quantile of the univariate target variable y ^ i u w α q by applying (4) and using the vector of parameters β i u α q estimated in Phase 1.
Phase 3: Evaluation of the accuracy of the forecasts through the performance metrics.
i.
Extract the measurement of the univariate target variable y i u w from the M t x u dataset.
ii.
Evaluate the PL function by applying (1), using y i u w extracted above and the corresponding y ^ i u w α q forecasted in Phase 2 for w = 1 , … , M t x u .
iii.
Define the upper and lower bounds, u and l, and extract the prediction interval upper bound ( y ^ i u w ) α u and the prediction interval lower bound ( y ^ i u w ) α l forecasted in Step 2 for w = 1 , … , M t x u .
iv.
Evaluate the PICP by applying (2), using y i u w , ( y ^ i u w ) α l and ( y ^ i u w ) α u extracted above for w = 1 , … , M t x u .
v.
Extract the maximum and minimum measurements for the univariate target variable, y i , max u w and y i , min u w , over the M t r u dataset.
vi.
Evaluate the PINAW by applying (3), using ( y ^ i u w ) α u , ( y ^ i u w ) α l , y i , max u w and y i , min u w extracted above.

3.2.2. Multivariate Approach

The algorithm of the mQR approach is applied to Y m . It consists of the following three phases:
  • Phase 1: Parameter estimation.
  • Phase 2: Forecast estimation.
  • Phase 3: Accuracy evaluation.
The details of each phase are presented below, followed by a flowchart in Figure 3 and the corresponding pseudocode in Algorithm 2.
Phase 1: Estimation of the vector of parameters β m α q for q = 1 , … , Q m .
This phase is composed of three steps.
  • Step 1: Estimation of the vector of parameters ( β i u m ) α ℓ of the u Q R m model for i = 1 , … , N B and ℓ = 1 , … , Q u m .
    i.
    Extract the vector of measurements of the univariate target variable y i u m t r u m and the matrix of the measurements of regressors x i u m t r u m (defined in (7) for the M t r u dataset) from the M t r u m dataset.
    ii.
    Express the vector of the α ℓ forecasted quantile of the univariate target variable y ^ i u m t r u m α ℓ as a function of the vector of parameters β i u m α ℓ by applying (6).
    iii.
    Estimate the vector of parameters β i u m α ℓ by solving the optimization problem in (5), which minimizes the PL function calculated using the vectors y i u m t r u m and y ^ i u m t r u m α ℓ introduced above.
  • Step 2: Forecast of the α ℓ -quantile of the univariate target variable y ^ i u k α ℓ for i = 1 , … , N B , ℓ = 1 , … , Q u m and k = 1 , … , M t r m .
    i.
    Extract the vector of measurements of regressors x i u m k = x i , 1 u m k , … , x i , N i u m u m k from the M t r m dataset.
    ii.
    Forecast the α ℓ -quantile of the univariate target variable y ^ i u k α ℓ by applying (4) and using the vector of parameters β i u m α ℓ estimated in Step 1.
  • Step 3: Estimation of the vector of parameters β m α q for q = 1 , … , Q m .
    i.
    Extract the vector of measurements of the univariate target variable y i u m t r u m from the M t r m dataset.
    ii.
    Generate the matrix y i ^ u m t r u m as defined in (9) by collecting the Q u m forecasted quantiles of the N B univariate target variables predicted over the M t r m dataset in Step 2.
    iii.
    Express the vector of the α q forecasted quantile of the multivariate target variable y ^ u m t r u m α q as a function of the vector of parameters β m α q by applying (11).
    iv.
    Estimate the vector of parameters β i m α q by solving the optimization problem in (10), which minimizes the sum of the PL function of the N B univariate target variable calculated using the vectors y i u m t r u m and y ^ i u m t r u m α q introduced above.
Phase 2: Forecast of the α q -quantile of the multivariate target variable y ^ m w α q for q = 1 , … , Q m and w = 1 , … , M t x m .
i.
Extract the vector of measurements of regressors x i u m w = x i , 1 u m w , … , x i , N i u m u m w from the M t x m dataset.
ii.
Forecast the α ℓ -quantile of the univariate target variable y ^ i u w α ℓ for i = 1 , … , N B , ℓ = 1 , … , Q u m and w = 1 , … , M t x m by applying (4) and using the vector x i u m w extracted above and the vector of parameters β u m α ℓ for q = 1 , … , Q u m estimated in Phase 1—Step 1.
iii.
Generate the matrix [ y i u m ] ^ using y ^ i u m w α ℓ for i = 1 , … , N B and ℓ = 1 , … , Q u m as defined in (12).
iv.
Forecast the α q -quantile of the multivariate target variable y ^ m w α q by applying (8) and using the vector of parameters β m α q estimated in Phase 1—Step 3.
Phase 3: Evaluation of the accuracy of the forecasts through the performance metrics for each univariate target variable.
i.
Extract the measurement of the N B univariate target variable y i u w from the M t x m dataset.
ii.
Evaluate the PL function by applying (1), using y i u w extracted above and the corresponding y ^ i u w α q (collected in y ^ m w α q ) forecasted in Step 2 for w = 1 , … , M t x m .
iii.
Define the upper and lower bounds, u and l, and extract the prediction interval upper bound ( y ^ i u w ) α u and the prediction interval lower bound ( y ^ i u w ) α l forecasted in Step 2 for w = 1 , … , M t x m .
iv.
Evaluate the PICP by applying (2), using y i u w , ( y ^ i u w ) α l and ( y ^ i u w ) α u extracted above for w = 1 , … , M t x m .
v.
Extract the maximum and minimum measurements for the univariate target variable, y i , max u w and y i , min u w , over the M t r m dataset.
vi.
Evaluate the PINAW by applying (3), using ( y ^ i m w ) α u , ( y ^ i m w ) α l , y i , max u w and y i , min u w extracted above.
Figure 3. Flowchart of the mQR approach.
Algorithm 2: Pseudocode of the mQR approach.
begin
for i = 1 to N B
Phase 1: Parameter estimation
Step 1
for v = 1 to M t r u m
save y i u m v and x i , 1 u m v , … , x i , N i u u m v
end
for ℓ = 1 to Q u m
define y ^ i u m t r α ℓ = [ x i u m t r u m ] β i u m α ℓ
solve β i u m α ℓ = arg min β i u m α ℓ 1 α ℓ − 1 y i u m t r ≤ y ^ i u m t r α ℓ ⊙ y i u m t r − y ^ i u m t r α ℓ 1
end
Step 2
for k = 1 to M t r m
save x i u m k = [ x i , 1 u m k , … , x i , N i u m u m k ]
for ℓ = 1 to Q u m
y ^ i u k α ℓ = x i u m k β i u m α ℓ ← forecasted quantile of the u Q R m model
end
end
Step 3
for v = 1 to M t r m
save y i u k
end
y i m t r
for q = 1 to Q m
define y ^ i m t r α q = [ y ^ i u m t r m ] β i m α q
end
solve β m α q = arg min ( β m ) α q ∑ i = 1 N B 1 α q − 1 y i m t r ≤ y ^ i m t r α q ⊙ y i m t r − y ^ i m t r α q 1
end
Phase 2: Forecast evaluation
for w = 1 to M t x m
for i = 1 to N B
save x i u m w = [ x i , 1 u m w , … , x i , N i u m u m w ]
for ℓ = 1 to Q u m
y ^ i u w α ℓ = x i u m w β i u m α ℓ
end
end
( y ^ i m w ) α q = y ^ i u m w β i m α q ← forecasted quantile of the mQR model
end
Phase 3: Accuracy evaluation
for i = 1 to N B
define α u and α l
for w = 1 to M t x m
for q = 1 to Q m
P L u w α q = y i u w − y ^ i u w α q α q − 1 y i u w ≤ y ^ i u w α q
end
P I C P ′ = P I C P ′ + 1 y ^ i u w α l ≤ y i u w ≤ y ^ i u w α u
P I N A W ′ = P I N A W ′ + y ^ i u w α u − y ^ i u w α l y i , m a x u w − y i , m i n u w
end
P I C P = P I C P ′ M t x u
P I N A W = P I N A W ′ M t x u
end

4. Numerical Results

The numerical results focus on forecasting the 99 quantiles of hourly electric power consumed by three public buildings located in Rome, each with different rated power and end-use profiles. The forecasts are performed every hour (24 origin times) for the next 24 h (24 lead times) using both uQR and mQR; to ensure non-crossing quantiles, the authors applied a rearrangement procedure after making a prediction by sorting the 99 forecasted quantiles. The results are compared with those of two persistence-based methods (i.e., that rely on the assumption that the forecast is equal to the most recent observation). The first, referred to as P1, sets the forecast equal to the last observed data across all quantiles (i.e., all quantiles converge toward a point-forecast). The second, referred to as P2, computes the CDF of the endogenous regressors on the training dataset and then derives the quantiles of the forecasted target variable.

4.1. Dataset

The dataset collects the hourly power consumption of public buildings through dedicated in-built sensors provided by the Energy Team [43], and it was provided by the University Campus Bio-Medico of Rome. The dataset collects the hourly power consumption of the following:
  • The CESA, with a rated power of 200 kW;
  • The PRABB, with a rated power of 1440 kW;
  • The POLY, with a rated power of 5500 kW.
CESA and PRABB have regular power consumption, as they serve a fixed number of users and operate within predetermined time slots (e.g., fixed visiting hours for the CESA); POLY exhibits highly unpredictable power consumption due to its direct response to medical emergencies. The three datasets collect samples with a resolution of 1 h from 1 January 2017 to 31 December 2022. To facilitate the forecasting analysis, only complete weeks are included; thus, all datasets span 2 January 2017 to 25 December 2022 (52,416 samples). Data about weather information are extracted from the NASA POWER website [44] and cover the same time frame.
The three datasets present anomalies. As an example, POLY data are shown in Figure 4a, where null, erroneous and exceeding values are highlighted. To address them, the data were postprocessed and anomalies were replaced with the values corresponding to the same time one week earlier. Such a substitution is not expected to introduce bias because the number of anomalous points is very low compared to the total number of samples. In fact, the number of anomalous points in the POLY dataset is very limited, with 22 for WDs and 4 for N-WDs out of 37,440 WD samples and 14,976 N-WD samples, respectively, (i.e., 0.06% and 0.03%). The results of the filtering process are shown in Figure 4b. Given the weekly cyclical pattern (e.g., PRABB in Figure 5), the data from each public building are grouped into WD and N-WD datasets. For uQR, the training subset is 80% of the data, spanning 2 January 2017 to 10 October 2021 (29,880 WD and 11,952 N-WD samples), and the test subset consists of the remaining 20%, spanning 11 October 2021 to 25 December 2022 (7560 WD and 3024 N-WD samples). For mQR, the training subset M t r u m is 60% of the data, spanning 2 January 2017 to 9 August 2020 (22,560 WD and 9024 N-WD samples); the training subset M t r m consists of 20% of the data, spanning 10 August 2020 to 10 October 2021 (7320 WD and 2928 N-WD samples); and the test subset is the remaining 20% of the data.
Figure 4. Power consumption of POLY: (a) gathered data; (b) filtered data.
Figure 5. Power consumption of PRABB: weekly patterns.

4.2. uQR Forecasts

Single public buildings: A uQR forecasting model for each hour to be predicted is considered. The most suitable endogenous (i.e., past values of the power consumption) and exogenous (i.e., weather information) regressors were selected by performing autocorrelation and hourly correlation analyses, respectively. As an example, Figure 6 reports the autocorrelation (a) and correlation (b) diagrams related to CESA for the WD (left) and to POLY for the N-WD (right) subset. Endogenous regressors are selected when their autocorrelation coefficients ρ exceed a predefined threshold. These thresholds are empirically set by balancing modeling accuracy (i.e., through the selection of the most informative regressors) and computational burden (i.e., strictly related to the number of regressors). The endogenous regressors are selected by choosing a threshold that satisfies ρ ≥ 0.7 because this value is sufficiently high to ensure an adequate correlation between the target variable and its past values. The threshold setting is eventually refined to guarantee the selection of at least two endogenous regressors but no more than three regressors, because the numerical results indicate that including more than three regressors in the model increases its complexity without yielding a significant improvement in forecasting accuracy. The external temperature, humidity and solar radiation are included in the linear regression model only if its correlation coefficient is | r | ≥ 0.5 , to guarantee a sufficient correlation. The numerical results show that the inclusion of humidity and solar radiation as external regressors in the forecasting model increases the complexity without yielding a significant improvement in forecasting accuracy. Consequently, only the external temperature is considered as an exogenous regressor. The uQR threshold results for each subset and public building are reported in Table 1. The forecast models for each building and subset are summarized in Table 2, where P o t refers to the absorption at the origin time and the last column of the table describes the hours for which the temperature T t is excluded from the model. It is worth noting that even though the second and third lags, i.e., P t − 2 and P t − 3 , exhibit high ρ values (see Figure 6a), they are not included in the forecasting model because they are not available at the origin time for all 24 lead times. In conclusion, 24 × 24 × 2 forecasting models are developed (i.e., 24 models for each origin time and subset), resulting in 24 × 24 × 2 optimization problems to be solved.
Figure 6. Autocorrelation (a) and correlation (b) diagrams for CESA WDs (left) and POLY N-WDs (right).
Table 1. uQR: autocorrelation and correlation thresholds for each subset and public building.
Table 2. Forecast models of the separated public buildings.
To evaluate the accuracy of the forecasts, the standard performance metrics presented in Section 2 are calculated. Table 3 reports the metric results for each subset (i.e., WDs and N-WDs), building (i.e., CESA, PRABB and POLY) and forecast method (i.e., P1, P2 and uQR). PL functions are averaged across all origin times and quantiles for the predicted hours (i.e., 24 × 99 × 7560 for WDs, and 24 × 99 × 3024 for N-WDs); this index is also normalized by the building’s rated power and expressed as a percentage. PICPs and PINAWs are averaged across all origin times. It is worth noting that the P1 method assigns equal values to all quantiles; thus, the PL function is averaged only across origin time for the predicted hours; PICP and PINAW cannot be calculated. Upon analyzing Table 3, it is evident that uQR consistently outperforms P1 and P2 across all subsets and public buildings. Focusing on the PL functions, uQR exhibits the lowest values; when comparing uQR and P2 (both averaged over the same quantity), uQR clearly yields values at least half smaller than those of P2. The maximum PL function is observed for POLY, with percentage values equal to 1.51% for WDs and 1.58% for N-WDs, respectively. Regarding PICPs, uQR accurately captures data variability because PICPs closely align with their corresponding PIs (e.g., PICP(10–90) = 0.78 and PICP(5–95) = 0.89 for CESA on WDs). However, for the POLY WD subset, the uQR exhibits greater values of PICPs than P2; this was expected because no regressors were specifically designed to account for COVID-19-related variability. Finally, in terms of PINAW, the uQR results are approximately half those of P2 for CESA and POLY, and for PRABB, the results are comparable between the two forecasting methods. As an example, Figure 7 reports uQR results from 14 November 2022 at 01:00 to 21 November 2022 at 00:00 (i.e., a one-week forecast with 0:00 as the origin time) for CESA (Figure 7a), PRABB (Figure 7b) and POLY (Figure 7c). For each figure, the red lines represent the measured power consumption (real observations), the blue dotted lines describe the expected values (given by the median of the 99th quantiles at each hour), and the shaded gray areas correspond to the PI(10–90) and PI(5–95) intervals.
Table 3. Standard metrics for WDs and N-WDs: separated public buildings.
Figure 7. One-week forecast using uQR: (a) CESA, (b) PRABB, and (c) POLY.
Aggregation of three public buildings: The dataset for the aggregation of buildings was created by summing the buildings’ power consumption hour by hour, resulting in a virtual building with a rated power equal to 7140 kW. During the preliminary analysis, a cyclical weekly pattern was still observed, and the dataset was divided into WD and N-WD subsets. As in previous cases, hourly forecasting models were selected based on autocorrelation and hourly correlation analyses. Figure 8 shows the autocorrelation (a) and correlation (b) diagrams for WDs (left) and N-WDs (right). The forecast models for each subset are summarized in Table 4. A comparison between Table 2 and Table 4 reveals that the selected regressors for the aggregation of public buildings (Table 4) are identical to those chosen for the POLY model (Table 2). This outcome is due to the dominance of POLY (rated power of 5500 kW) in the aggregated data (rated power of 7140 kW), which outweighs the influence of the other two buildings.
Figure 8. Autocorrelation (a) and correlation (b) diagrams for WDs (left) and N-WDs (right).
Table 4. uQR forecasting models of the aggregation of public buildings.
To assess whether directly forecasting the aggregation of buildings improves accuracy compared to forecasting each building separately, the performance metrics of the aggregated public buildings are compared with those obtained by summing the three public building uQR forecasts for each predicted hour. The results of this comparison are reported in Table 5 for both WDs and N-WDs. The outcomes are very similar. Focusing on PL function, aggregating the buildings leads to a slight deterioration in this metric. For example, Figure 9 presents contour maps of the normalized percentage PL function for the 50- t h quantile for both WDs (a) and N-WDs (b) and for both the aggregation of buildings (left) and the sum of single buildings (right). These maps show for each origin time (x-axis) the PL for the next 24 h (y-axis) averaged on the test days (i.e., 315 for WDs and 126 for N-WDs). As shown, the results are similar, but on average, the aggregation of building forecasts exhibits a higher PL. Regarding PICPs and PINAWs, the forecasts for the aggregation of buildings show slightly better performance. Additionally, comparing Table 3 and Table 5, the results for the aggregation of buildings closely resemble those of POLY, further confirming the strong influence of this building on the aggregated dataset.
Table 5. Standard metrics: comparison between the separated and the aggregated buildings.
Figure 9. PL function contour maps: comparison between the separated and aggregated buildings.

4.3. mQR Forecasts

The mQR approach involves two training processes: the first aims to train the uQR models, and the second aims to train the mQR models. Concerning the first training process, for each public building (e.g., CESA), the endogenous regressors consist of past values of the building’s power consumption (e.g., CESA), and exogenous regressors consist of past values of the power consumption of the other two public buildings (e.g., POLY and PRABB). Such regressors were selected by performing autocorrelation and cross-correlation analyses, respectively. As an example, Figure 10 presents autocorrelation (a) and cross-correlation (b,c) diagrams of the PRABB for WDs (top) and N-WDs (bottom). As for the uQR approach, endogenous and exogenous regressors are selected if their correlation and cross-correlation coefficients exceed predefined thresholds; they are empirically set, and their values are reported in Table 6 for each public building and subset. As shown in the table, the most informative endogenous regressors are adequately correlated, being characterized by ρ ≥ 0.73 for endogenous regressors and by r ≥ 0.40 for exogenous regressors. The uQR forecasting models for each public building and subset are summarized in Table 7. As shown in the table, the models involve only three regressors; this choice was made to reduce model complexity. In the second training process, an mQR forecasting model is considered for each hour to be predicted. Endogenous and exogenous regressors are the uQR forecasted quantiles for the corresponding predicted hour. To reduce the model parameters and thus the computational effort of the associated optimization problem, only 11 uQR forecasted quantiles for each public building are considered, corresponding to the order of quantiles 1, 10, 20, 30, 40, 50, 60, 70, 80, 90, and 99. Consequently, for each public building, the mQR forecasting model uses as regressors the 11 × 3 uQR forecasted quantiles (i.e., 11 forecasted quantiles for each public building).
Figure 10. Autocorrelation (a) and cross-correlation (b,c) diagrams of PRABB for WDs (top) and POLY N-WDs (bottom).
Table 6. mQR: autocorrelation and cross-correlation thresholds for each subset and public building.
Table 7. uQR forecasting models of the public buildings in the mQR framework.
The accuracy of the mQR forecasts is discussed in comparison with the uQR results. Table 8 reports the standard performance metrics for each building, forecast method and subset. In general, uQR shows superior overall performance compared to mQR. However, mQR provides slightly better accuracy in terms of both PICP and PINAW when applied to POLY, suggesting that mQR could be an effective approach for forecasting power consumption characterized by irregular variability. It is worth noting that the mQR model shows, for the WD case, slightly under-dispersed predictions because the PICPs, also calculated for other interval rates, are always slightly smaller than the nominal interval rates. This does not apply systematically to the N-WD case. As an example, Figure 11 reports the mQR results from 14 November 2022 at 01:00 to 21 November 2022 at 00:00 (i.e., a one-week forecast with 0:00 as the origin time) for CESA (Figure 7a), PRABB (Figure 7b) and POLY (Figure 7c).
Table 8. Standard metrics for WDs and N-WDs: separated public buildings.
Figure 11. One-week forecast using mQR: (a) CESA, (b) PRABB, and (c) POLY.

5. Conclusions

Non-parametric probabilistic load forecasting (PLF) is crucial for the effective control and management of distribution grids. By avoiding assumptions about the probability distribution, the method accurately handles the inherently high variability and uncertainty of electric loads. In this study, two non-parametric PLF approaches based on quantile regression (QR) are employed: the univariate QR (uQR), which forecasts the quantiles of a single target variable given a set of regressors, and the multivariate QR (mQR), which forecasts the quantiles of multiple target variables using the previously univariate forecasted quantiles as regressors. Both approaches were applied to forecast, every hour (24 origin times), the next 24 h (24 lead times) using real-world electricity consumption data from three public buildings in Rome. The accuracy of the uQR and mQR were then evaluated using standard performance metrics (i.e., the pinball loss (PL) function, prediction interval coverage probability (PICP), and prediction interval normalized average width (PINAW)) and benchmarked against two persistence-based methods. The main outcomes are as follows:
  • Both the uQR and mQR significantly outperformed the persistence benchmarks in terms of standard performance metrics, thereby validating the effectiveness of the QR-based approaches.
  • Focusing on the uQR, directly forecasting the aggregation of building consumption proved to be more effective when modeling overall prediction intervals compared to simply summing single building forecasts. This approach resulted in improved PICPs and PINAWs; however, it also demonstrated a slight deterioration in the PL function.
  • Comparing uQR and mQR, the former proved to be the most effective approach for forecasting the power consumed by the three public buildings located in Rome; the latter achieved slightly better results in terms of PICP and PINAW only for the building with irregular and unpredictable consumption (i.e., POLY), suggesting that mQR could also be an effective approach.
Future work will apply the uQR to a larger number of loads to define an optimal strategy, which will identify, based on forecasting accuracy and computational effort, whether to forecast the aggregated loads directly or to sum the single load forecasts. Additionally, the mQR’s accuracy will be evaluated by integrating meteorological variables into the forecasting models. Finally, a comparative analysis will be conducted against more versatile non-parametric PLF methods to assess the robustness of the current approaches.

Author Contributions

Conceptualization, S.P. and A.R.D.F.; methodology, S.P., A.R.D.F. and P.D.F.; software, S.P. and A.I.; validation, S.P. and A.I.; resources, F.C.; data curation, F.C.; writing—original draft preparation, S.P. and A.R.D.F.; writing—review and editing, S.P., A.R.D.F., F.C. and P.D.F.; visualization, S.P. and A.I.; supervision, A.R.D.F. and P.D.F. All authors have read and agreed to the published version of the manuscript.

Funding

This research is financially supported by the Project ECS 0000024 Rome Technopole,-CUP H33C22000420001, NRP Mission 4 Component 2 Investment 1.5, funded by the European Union—NextGenerationEU.

Data Availability Statement

The data presented in this study are available on request from the corresponding author. because the data are not publicly available due to privacy and legal restrictions.

Conflicts of Interest

The authors declare no conflicts of interest.

Nomenclature

( β i ) α q Parameter of the univariate approach of Y i u related to α q
α q Quantile of order q
J i , j m j-th multivariate external random variable of Y i m
J i , j u j-th univariate external random variable of Y i u
M m t r Number of training data for the multivariate approach
M m t x Number of test data for the multivariate approach
M u t r Number of training data for the univariate approach
M u t x Number of test data for the univariate approach
M u _ m t r Number of training data for the univariate approach in the multivariate framework
N B Number of univariate target variables
N E i Number of external variables
N m i Number of regressors for the multivariate approach
N u i Number of regressors for the univariate approach
N u _ m i Number of regressors for the univariate approach in the multivariate framework
Q u _ m Number of quantiles for the univariate approach in the multivariate framework
rCorrelation coefficient
ρ Autocorrelation coefficient
tTimestamp
X i , j u j-th univariate regressor random variable of Y i u
X i , j u _ m j-th univariate regressor random variable of Y i u in the multivariate framework
Y i u Univariate target random variables
Y i m Multivariate target random variables
⊙Represents the Schur product
1 Vector of unitary elements
1 Indicator functions

Abbreviations and Acronyms

AIArtificial intelligence
BEMSBuilding energy management system
CDFCumulative distribution function
CESACenter for the Health of the Elderly
DERDistributed energy resource
DSODistribution system operator
ECEmpirical copula
KDEKernel density estimation
LFLoad forecasting
MDNMixture Density Network
mQRMultivariate quantile regression
N-WDNon-working day
PDFProbability density function
PIPredicted interval
PICPPrediction interval coverage probability
PINAWPrediction interval normalized average width
PLPinball loss
PLFProbabilistic load forecasting
POLYPolyclinic
PRABBAdvanced Research Biomedicine Bioengineering Centre
QRQuantile regression
RECRenewable energy community
SHASHSinh–Arcsinh
TSOTransmission system operator
uQRUnivariate quantile regression
u Q R m Univariate quantile regression applied in the multivariate framework
WDWorking day

References

  1. Saxena, A.; Shankar, R.; El-Saadany, E.; Kumar, M.; Zaabi, O.; Al-Hosani, K.; Muduli, U. Intelligent Load Forecasting and Renewable Energy Integration for Enhanced Grid Reliability. IEEE Trans. Ind. Appl. 2024, 60, 8403–8417. [Google Scholar] [CrossRef] [Scilit]
  2. Biswal, B.; Deb, S.; Datta, S.; Ustun, T.S.; Cali, U. Review on smart grid load forecasting for smart energy management using machine learning and deep learning techniques. Energy Rep. 2024, 12, 3654–3670. [Google Scholar] [CrossRef] [Scilit]
  3. Liu, J.; Hou, Z.; Wang, B.; Yi, T. Optimizing Microgrid Energy Management via DE-HHO Hybrid Metaheuristics. Comput. Mater. Contin. 2025, 84, 4729–4754. [Google Scholar] [CrossRef] [Scilit]
  4. Dab, K.; Nagarsheth, S.H.; Amara, F.; Henao, N.; Agbossou, K.; Dubé, Y.; Sansregret, S. Uncertainty Quantification in Load Forecasting for Smart Grids Using Non-Parametric Statistics. IEEE Access 2024, 12, 138000–138017. [Google Scholar] [CrossRef] [Scilit]
  5. Ponoćko, J.; Milanović, J.V. Forecasting Demand Flexibility of Aggregated Residential Load Using Smart Meter Data. IEEE Trans. Power Syst. 2018, 33, 5446–5455. [Google Scholar] [CrossRef] [Scilit]
  6. Prat, E.; Dukovska, I.; Nellikkath, R.; Thoma, M.; Herre, L.; Chatzivasileiadis, S. Network-Aware Flexibility Requests for Distribution-Level Flexibility Markets. IEEE Trans. Power Syst. 2024, 39, 2641–2652. [Google Scholar] [CrossRef] [Scilit]
  7. Tsaousoglou, G.; Junker, R.; Banaei, M.; Tohidi, S.S.; Madsen, H. Integrating Distributed Flexibility Into TSO-DSO Coordinated Electricity Markets. IEEE Trans. Energy Mark. Policy Regul. 2024, 2, 214–225. [Google Scholar] [CrossRef] [Scilit]
  8. Wang, Y.; Chen, Q.; Hong, T.; Kang, C. Review of Smart Meter Data Analytics: Applications, Methodologies, and Challenges. IEEE Trans. Smart Grid 2019, 10, 3125–3148. [Google Scholar] [CrossRef] [Scilit]
  9. Nespoli, L.; Medici, V.; Lopatichki, K.; Sossan, F. Hierarchical demand forecasting benchmark for the distribution grid. Electr. Power Syst. Res. 2020, 189, 106755. [Google Scholar] [CrossRef] [Scilit]
  10. Zhao, T.; Wang, J.; Zhang, Y. Day-Ahead Hierarchical Probabilistic Load Forecasting With Linear Quantile Regression and Empirical Copulas. IEEE Access 2019, 7, 80969–80979. [Google Scholar] [CrossRef] [Scilit]
  11. Rivera-Caballero, O.; Cogley, A.; Ríos, M.; González, J.; Boya-Lara, C. Hierarchical Forecasting of Load Demand with Smart Meter Data for Distribution Networks. In Proceedings of the 2022 IEEE 40th Central America and Panama Convention (CONCAPAN), Panama City, Panama, 9–12 November 2022; pp. 1–5. [Google Scholar] [CrossRef] [Scilit]
  12. Zhang, Y.; Wang, J.; Zhao, T. Using Quadratic Programming to Optimally Adjust Hierarchical Load Forecasting. IEEE Trans. Power Syst. 2018, 1. [Google Scholar] [CrossRef] [Scilit]
  13. Bai, Y.; Camal, S.; Michiorri, A. News and Load: A Quantitative Exploration of Natural Language Processing Applications for Forecasting Day-Ahead Electricity System Demand. IEEE Trans. Power Syst. 2024, 39, 6222–6234. [Google Scholar] [CrossRef] [Scilit]
  14. Bai, Y.; Camal, S.; Michiorri, A. News and Load: Social and Economic Drivers of Regional Multi-Horizon Electricity Demand Forecasting. IEEE Trans. Power Syst. 2025, 40, 4839–4851. [Google Scholar] [CrossRef] [Scilit]
  15. Aprillia, H.; Yang, H.T.; Huang, C.M. Statistical Load Forecasting Using Optimal Quantile Regression Random Forest and Risk Assessment Index. IEEE Trans. Smart Grid 2021, 12, 1467–1480. [Google Scholar] [CrossRef] [Scilit]
  16. Chodakowska, E.; Nazarko, J.; Nazarko, L. ARIMA Models in Electrical Load Forecasting and Their Robustness to Noise. Energies 2021, 14, 7952. [Google Scholar] [CrossRef] [Scilit]
  17. Li, Z.; Li, Y.; Liu, Y.; Wang, P.; Lu, R.; Gooi, H.B. Deep Learning Based Densely Connected Network for Load Forecasting. IEEE Trans. Power Syst. 2021, 36, 2829–2840. [Google Scholar] [CrossRef] [Scilit]
  18. Abumohsen, M.; Owda, A.Y.; Owda, M. Electrical Load Forecasting Using LSTM, GRU, and RNN Algorithms. Energies 2023, 16, 2283. [Google Scholar] [CrossRef] [Scilit]
  19. Saini, P.; Parida, S. A novel probabilistic gradient boosting model with multi-approach feature selection and iterative seasonal trend decomposition for short-term load forecasting. Energy 2024, 294, 130975. [Google Scholar] [CrossRef] [Scilit]
  20. Liu, J.; Hou, Z.; Yin, T. Short-term power load forecast using OOA optimized bidirectional long short-term memory network with spectral attention for the frequency domain. Energy Rep. 2024, 12, 4891–4908. [Google Scholar] [CrossRef] [Scilit]
  21. Rani, N.; Aggarwal, S.K.; Kumar, S. Short-Term Load Foresting Using Combination of Linear and Non-Linear Models. IEEE Access 2024, 12, 58993–59006. [Google Scholar] [CrossRef] [Scilit]
  22. Smyl, S.; Dudek, G.; Pełka, P. Contextually enhanced ES-dRNN with dynamic attention for short-term load forecasting. Neural Netw. 2024, 169, 660–672. [Google Scholar] [CrossRef] [Scilit]
  23. Xing, J.; Su, J.; Xue, Y.; Chang, X.; Li, Z.; Sun, H. A Unifying Framework for Short-Term Load Forecasting via EM-CCGPBOATT Methodology. IEEE Trans. Power Syst. 2025, 40, 1414–1426. [Google Scholar] [CrossRef] [Scilit]
  24. Kaur, D.; Islam, S.N.; Mahmud, M.A.; Haque, M.E. Interval-based Probabilistic Load Forecasting for Individual Households: Clustering Approach. In Proceedings of the 2022 IEEE PES 14th Asia-Pacific Power and Energy Engineering Conference (APPEEC), Melbourne, Australia, 20–23 November 2022; pp. 1–6. [Google Scholar] [CrossRef] [Scilit]
  25. Fernández-Jiménez, L.; Terreros-Olarte, S.; Capellán-Villacián, C.; Falces, A.; García-Garrido, E.; Lara-Santillán, P.; Mendoza-Villena, M.; Zorzano-Alba, E.; Zorzano-Santamaría, P. Probabilistic short-term load forecasting models based on a parametric approach. Renew. Energy Power Qual. J. 2024, 22, 101–106. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  26. Ochoa, T.; Serpell, C.; Gil, E.; Valle, C. A Four Parameter Distribution Family for Probabilistic Load Forecasting and Scenario Generation with Mixture Density Networks. In Proceedings of the 2023 IEEE Power & Energy Society General Meeting (PESGM), Orlando, FL, USA, 16–20 July 2023; pp. 1–5. [Google Scholar] [CrossRef] [Scilit]
  27. Zhou, N.; Xu, X.; Yan, Z.; Shahidehpour, M. Spatio-Temporal Probabilistic Forecasting of Photovoltaic Power Based on Monotone Broad Learning System and Copula Theory. IEEE Trans. Sustain. Energy 2022, 13, 1874–1885. [Google Scholar] [CrossRef] [Scilit]
  28. He, Y.; Zheng, Y. Short-term power load probability density forecasting based on Yeo-Johnson transformation quantile regression and Gaussian kernel function. Energy 2018, 154, 143–156. [Google Scholar] [CrossRef] [Scilit]
  29. Zhang, S.; Wang, Y.; Zhang, Y.; Wang, D.; Zhang, N. Load probability density forecasting by transforming and combining quantile forecasts. Appl. Energy 2020, 277, 115600. [Google Scholar] [CrossRef] [Scilit]
  30. Liu, M.; Wang, J.; Deng, S.; Zhong, C.; Wang, Y. Short-term load probabilistic forecasting based on non-equidistant monotone composite quantile regression and improved MICN. Energy 2025, 320, 135339. [Google Scholar] [CrossRef] [Scilit]
  31. Bracale, A.; Caramia, P.; De Falco, P.; Hong, T. Multivariate Quantile Regression for Short-Term Probabilistic Load Forecasting. IEEE Trans. Power Syst. 2020, 35, 628–638. [Google Scholar] [CrossRef] [Scilit]
  32. Haben, S.; Giasemidis, G.; Ziel, F.; Arora, S. Short term load forecasting and the effect of temperature at the low voltage level. Int. J. Forecast. 2019, 35, 1469–1484. [Google Scholar] [CrossRef] [Scilit]
  33. Gilbert, C.; Browell, J.; Stephen, B. Probabilistic load forecasting for the low voltage network: Forecast fusion and daily peaks. Sustain. Energy, Grids Netw. 2023, 34, 100998. [Google Scholar] [CrossRef] [Scilit]
  34. Xu, C.; Sun, Y.; Du, A.; Gao, D.-c. Quantile regression based probabilistic forecasting of renewable energy generation and building electrical load: A state of the art review. J. Build. Eng. 2023, 79, 107772. [Google Scholar] [CrossRef] [Scilit]
  35. Perna, S.; Austnes, P.F.; Gerini, F.; Chevron, M.; Di Fazio, A.R.; De Falco, P.; Paolone, M. A Comparative Analysis of Empirical Copula and Quantile Regression Methods for Probabilistic Load Forecasting. In Proceedings of the 2024 18th International Conference on Probabilistic Methods Applied to Power Systems (PMAPS), Auckland, New Zealand, 24–26 June 2024; pp. 1–6. [Google Scholar] [CrossRef] [Scilit]
  36. Austnes, P.F.; García-Pareja, C.; Nobile, F.; Paolone, M. Probabilistic Load Forecasting of distribution power systems based on empirical copulas. Sustain. Energy Grids Netw. 2025, 42, 101708. [Google Scholar] [CrossRef] [Scilit]
  37. Yan, B.; Yang, W.; He, F.; Zeng, W. Occupant behavior impact in buildings and the artificial intelligence-based techniques and data-driven approach solutions. Renew. Sustain. Energy Rev. 2023, 184, 113372. [Google Scholar] [CrossRef] [Scilit]
  38. Zhang, C.; Ma, L.; Luo, Z.; Han, X.; Zhao, T. Forecasting building plug load electricity consumption employing occupant-building interaction input features and bidirectional LSTM with improved swarm intelligent algorithms. Energy 2024, 288, 129651. [Google Scholar] [CrossRef] [Scilit]
  39. Liu, C.; Xu, Z.; Yuan, M.; Xie, J.; Yuan, Y.; Ma, K. Building electrical load forecasting with occupancy data based on wireless sensing. Appl. Energy 2025, 380, 124960. [Google Scholar] [CrossRef] [Scilit]
  40. Koukaras, P.; Mustapha, A.; Mystakidis, A.; Tjortjis, C. Optimizing Building Short-Term Load Forecasting: A Comparative Analysis of Machine Learning Models. Energies 2024, 17, 1450. [Google Scholar] [CrossRef] [Scilit]
  41. Capotosto, T.; Rita Di Fazio, A.; Perna, S.; Conte, F.; Iannello, G.; De Falco, P. Day-ahead Forecast of PV Systems and End-Users in the Contest of Renewable Energy Communities. In Proceedings of the 2022 AEIT International Annual Conference (AEIT), Chiba, Japan, 5–7 January 2022; pp. 1–6. [Google Scholar] [CrossRef] [Scilit]
  42. Di Fazio, A.R.; Conte, F.; Natrella, G. Enhancing Management and Control of Renewable Energy Communities: A Practical Implementation. In Proceedings of the 2024 3rd International Conference on Energy Transition in the Mediterranean Area (SyNERGY MED), Limassol, Cyprus, 21–23 October 2024; pp. 1–5. [Google Scholar] [CrossRef] [Scilit]
  43. Energy Team. Available online: https://www.energyteam.it/ (accessed on 10 October 2025).
  44. Nasa Power Data Access. Available online: https://power.larc.nasa.gov/ (accessed on 10 October 2025).
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.