2.1. Study Area and Data Sources
The study concerns the aggregated hourly electricity consumption of approximately 300 residential households in the Polish single-zone G11 tariff group in Gliwice, southern Poland [
8]. The distribution system operator provided an aggregated time series without data from individual meters. The target variable is the hourly electricity consumption of the entire group [kWh]; the main characteristics of the dataset are summarized in
Table 1.
The source series covers 731 days and contains no gaps, missing values, or duplicate timestamps. After generating the historical features, 17,376 complete rows remained. The two-year period provides at least one year of history before each test period and covers daily, weekly, and seasonal variability [
3]. The load profile is shaped by activity rhythms and seasonal conditions [
3,
6,
10]. In contrast to the earlier comparison of forecasting algorithms for the same consumer group [
8], the present study uses these data to assess the dependence of XGBoost accuracy and SHAP attributions on the experimental configuration.
Meteorological and calendar variables represent weather conditions and consumer activity cycles [
6,
9,
10]. Each electricity-consumption observation was matched with meteorological and calendar data at hourly resolution. All meteorological predictors used during model training, validation, and testing were archived numerical weather prediction (NWP) forecast values obtained from the same external operational forecasting system. The system updates its forecasts automatically several times per day and provides forecast horizons of up to 10 days. For the day-ahead workflow, a forecast snapshot was typically retrieved at approximately 08:00–09:00 on day N, and the hourly meteorological values for the complete day N + 1 were used as inputs to the load-forecasting model. A single meteorological forecast series representative of Gliwice was assigned to the entire aggregated consumer group. The exact model issue time associated with individual archived forecast snapshots, the exact update interval, the underlying NWP grid resolution, and the provider-side spatial aggregation or interpolation procedure were not available in the retained technical documentation. The provider cannot be disclosed under the data-access terms. Calendar variables were known in advance.
The source data were supplied in local time on a regular 24 h daily grid. According to the data provider’s convention, during the autumn daylight-saving-time transition, when the local day contains 25 h, the additional hourly observation was removed. During the spring transition, when the local day contains 23 h, the missing hourly observation was reconstructed by the provider as the arithmetic mean of the immediately preceding and following hourly observations. These adjustments were performed by the provider before the data were delivered; no additional time-zone or DST correction was applied by the authors.
The source timestamps marked the end of each hourly interval; for reporting and interpretation of the hourly results, they were displayed one hour earlier so that hours 0–23 denote interval start times. The variables month, day_of_week, and day_off were not recomputed according to this reporting convention and therefore refer to the following date for records displayed as 23:00. This affects 4.17% of day_of_week values, 0.13% of month values, and 1.08–1.34% of day_off values within a 31-day configuration. The convention does not cause data leakage because all calendar variables were available before forecasting, but it creates a limited semantic mismatch in their interpretation at the day boundary when records are expressed using interval-start timestamps. The same convention was applied consistently in all 16 experimental configurations.
The precipitation variable represents the precipitation amount accumulated during the preceding hour, consistent with the source-data definition and the end-of-interval timestamp convention described above. The formula for heat_index was not retained; this variable was identical to temperature in all winter, spring, and autumn observations and in 600 of the 744 summer observations, with a summer correlation of approximately 0.9974. It was retained to reproduce the original experiment. Because of this near redundancy, heat_index and temperature should not be interpreted as independent physical drivers, and their individual SHAP attributions may be redistributed between correlated predictors. An ablation variant excluding heat_index would constitute a different model specification and is therefore treated as a sensitivity-analysis direction rather than as a retrospective modification of the evaluated 19-feature experiment. Pressure values used by the model ranged from approximately 98 to 104 kPa; in the waterfall plot they were converted to hPa for presentation.
2.3. XGBoost Forecasting Model
The regularized gradient-boosted tree algorithm XGBoost [
16] was applied, which is suitable for nonlinear dependencies and interactions [
16,
18]. Its usefulness in load forecasting is confirmed by previous studies [
8,
19].
The forecasting of hourly electricity consumption was formulated as a regression task: for each time point
t, the model generates a prediction
of the actual consumption
[kWh] based on the vector of input features
described in
Section 2.2. The objective function minimized by XGBoost has the form:
where
is the squared loss appropriate for a regression problem (
objective: reg:squarederror),
denotes the
k-th tree among the
K component trees, and the regularization term
penalizes excessive model complexity by constraining the number of leaves
and the squared norm of the leaf weights
, where
and
are regularization hyperparameters [
16]. In accordance with the experimental documentation, the same fixed random seed (random state) was used in all 16 configurations for elements involving random sampling (
subsample,
colsample_bytree). During the revision, the training code was recovered and confirmed that the random-state value used in the original procedure was 42. The serialized models from the original experiment were not retained; however, the recovered code enabled an additional multi-seed sensitivity analysis described in
Section 2.5.
In the recovered implementation, the XGBoost estimator used
objective=reg:squarederror,
random_state=42,
verbosity=0, and
n_jobs=-1; the six optimized hyperparameters are reported in
Table 3, while the remaining estimator arguments were left at their library defaults. The revision-time verification and sensitivity analyses were performed using Python 3.14, Anaconda Navigator 2.7.1, Spyder 5.4.3, XGBoost 3.2.0, scikit-learn 1.2.2, NumPy 1.26.4, pandas 2.1.4, SciPy 1.11.4, Matplotlib 3.8.0, and openpyxl 3.0.10. This software specification refers to the revision-time analyses and should not be interpreted as a reconstruction of the complete historical runtime environment of the original experiment.
In this work, a single global XGBoost model was used, covering the forecasting of electricity consumption for all hours of the day. The information about the hour for which the forecast is issued is represented by the calendar input variable
hour (
Table 2), which allows the model to capture the specificity of individual hours without the need to train separate hourly models, in contrast to the scheme used in our previous study [
8].
Six hyperparameters were optimized, specifying the number and depth of trees, the learning rate, the sampling of observations and features, and the minimum split gain (
Table 3).
The grid was searched with five chronological TimeSeriesSplit folds, minimizing the validation MAE (mean absolute error). In case of ties, the first configuration in the deterministic grid order was selected. H1 was tuned once on a shared 2023 window, whereas H2 hyperparameters were selected once for each of the eight configurations using its initial training window; the selected parameters remained fixed for the test period. The
values serve solely for selection within a given window, and the H1–H2 comparison also encompasses differences in the scope and recency of the validation data. The construction remains consistent with the general scheme of our previous study [
8]. The chronological cross-validation splitter was instantiated as
TimeSeriesSplit(n_splits=5), with no additional splitter arguments specified. Together with the tuning-window boundaries specified in
Section 2.4 and
Table 4, this deterministically defines the training and validation splits used for hyperparameter selection.
2.4. Experimental Design
The study was designed as a systematic comparison of three dimensions of methodological decisions related to forecast accuracy and to the stability of SHAP (SHapley Additive exPlanations) model interpretation. In all configurations, the same XGBoost model class (
Section 2.3), the same 19-element input feature space (
Section 2.2), and the same daily forecast horizon (24 h, day-ahead) were used. Keeping these elements fixed makes it possible to link the observed differences to the experimental strategies being compared, but does not amount to identification of isolated causal effects. In particular, the seasonal period represents a specific month, the window strategies differ simultaneously in sample size and sample age, and the H1 and H2 strategies differ in the scope and recency of the data used for tuning.
The factors considered define an experimental configuration matrix with three dimensions:
Selected seasonal test period (four levels: winter, spring, summer, autumn)—Each level is represented by a 31-day test period in 2024, preceded by at least one year of training material; the four periods are treated as distinct test realizations rather than replicated estimates of a general seasonal effect;
Training-window strategy (two levels): Sliding—A window of fixed length of 365 days, covering a full annual cycle and shifted with the progress of the simulation; expanding—a window anchored at the first complete feature row, i.e., 8 January 2023, and growing monotonically (the mechanics of walk-forward retraining are described in
Section 2.5). The comparison concerns these two specific strategies of managing the data history; other lengths of the sliding window were not analyzed.
Hyperparameter tuning strategy (two levels): H1—A shared configuration determined once on 2023 data and used in all configurations of this group; H2—a configuration determined separately on the initial training window of each configuration (
Section 2.3). These are two complete tuning strategies, which also differ in the recency and scope of the data used for validation.
The product of the levels of all three dimensions () yields 16 experimental configurations. The hyperparameter values for the H1 strategy were determined once by grid search on 2023 data (1 January 2023–31 December 2023) and applied without modification in all eight configurations of this group; in the H2 strategy, tuning was carried out independently on the training window of each of the eight configurations. The range 1 January 2023–31 December 2023 is the nominal series range for H1 tuning; after feature generation, the complete observations available for estimation begin on 8 January 2023.
The dates of the test periods and of the corresponding effective training windows for both strategies are compiled in
Table 4. The test periods are identical for sliding and expanding within the same season, which removes the difference on the test-set side. The comparison does not, however, isolate the abstract principle of window updating itself, since the strategies differ simultaneously in the retention of older observations, in training sample size, and in data age. The results should therefore be referred to specific strategies: a one-year sliding window and an expanding window from the first complete feature row, i.e., 8 January 2023.
The choice of the range of history used for estimation is an important element of the forecasting procedure under conditions of possible process instability. An expanding window increases the sample size but also retains older observations, whereas a sliding window limits the influence of outdated data at the cost of a smaller sample. The literature indicates that the choice between these strategies reflects a trade-off between bias and variance of the forecast error and is not universal in nature [
35,
36]. For this reason, the window strategy was treated as a separate dimension of the comparison rather than adopting one of the strategies as the default.
The full matrix of 16 configurations, together with the adopted labels, is listed in
Table 5. Each configuration label encodes the season and the window strategy (S1–S4 for sliding, E1–E4 for expanding, where the index numbers the seasons in the order winter–spring–summer–autumn) and the hyperparameter strategy (H1 or H2). These labels are used consistently in
Section 3.
The S1-H1 configuration (winter, sliding, fixed hyperparameters) was retained for detailed beeswarm, waterfall, and SHAP dependence plots as a simple reference configuration combining a 365-day training window with the shared H1 hyperparameters. Before this selection, the complete values of the 19 features and local attributions were verified for all 16 configurations, and a set of control plots was generated. S1-H1 was not selected as the statistically most representative or best-performing configuration. A post hoc quantitative comparison showed, however, that its complete 19-feature SHAP ranking was strongly aligned with the aggregate ranking across all 16 configurations (). The choice of S1-H1 serves the local diagnostic presentation and does not imply that its local patterns are identical in the remaining configurations.
2.5. Training, Validation, and Testing Procedure
A walk-forward retraining scheme was applied: before each forecasted day, the model was retrained on the current data window.
Each configuration comprises a 31-day test period and its own training window: 365 days for sliding, or all complete rows from 8 January 2023 for expanding. The external evaluation consists of 31 consecutive day-ahead forecasts of 24 h each; no additional holdout test set was set aside.
Let
denote a single global XGBoost model defined in
Section 2.3. For each configuration, the walk-forward retraining proceeds according to the following procedure: (1) the model
is trained on observations from the initial training window of the given configuration, covering all hours of the day; (2) the model generates forecasts for the 24 h of the first test day; (3) once the actual consumption values for this day become available, these values—rather than the forecasted values—are appended to the training set; (4) the extent of the training window is updated in line with the window strategy (described below); and (5) before forecasting the next day, the model
is refit on the updated window, with hyperparameters frozen for the entire simulation. Each configuration comprises 31 used model fits: one initial fit and 30 retrainings preceding the forecasts of days 2–31. This yields 31 daily forecasts, i.e., 744 hourly forecasts per configuration. Hyperparameters are not retuned during the loop: in the H1 strategy they come from a single tuning on the shared reference window, and in the H2 strategy from a single tuning on the training window of the given configuration, performed before the start of the simulation (
Section 2.3 and
Section 2.4).
In expanding, the start of 8 January 2023 remains fixed, while in sliding, after a day is added, the 24 oldest records are removed, keeping the window at 365 days. Both strategies use exclusively data preceding the forecasted day (
Figure 2).
In total, 496 used XGBoost fits were performed (16 configurations × 31 days) and nine tuning procedures: one for H1 and eight for H2. To assess sensitivity to algorithmic randomness, an additional fixed-hyperparameter multi-seed analysis was performed using ten predefined random-state values, 38–47, including the original value of 42. The hyperparameters selected in the original H1 and H2 procedures were held fixed at the values reported in
Section 3.1, and the Grid Search procedures were not repeated. Thus, this analysis isolates variability associated with stochastic model fitting conditional on the originally selected hyperparameters and does not assess possible random-seed sensitivity of the hyperparameter-selection stage. The same training windows, test periods, feature set, and 31-day walk-forward procedure were retained.
Seven configurations used stochastic observation or feature sampling because either subsample or colsample_bytree was below 1.0. For these configurations, the complete walk-forward procedure was evaluated for all ten random states. In the remaining nine configurations, both sampling parameters were equal to 1.0 and changing the random state did not alter the fitted-model outputs under the fixed parameterization; these configurations therefore served as seed-invariant references. For each realization, MAE, RMSE, and MAPE were recalculated, and between-seed variability was summarized using the mean, standard deviation, and range.
2.6. Forecasting Accuracy Metrics
Accuracy was assessed using MAE (mean absolute error), RMSE (root mean square error), and MAPE (mean absolute percentage error), extending the set of measures used in our previous study [
8].
To provide a model-free reference for the reported XGBoost accuracy, two persistence benchmarks were evaluated on exactly the same four 31-day test periods. The 24 h persistence forecast was defined as and the 168 h persistence forecast as . Both forecasts use only consumption values available before the forecasted day, require no model fitting or parameter estimation, and were evaluated using the same MAE, RMSE, and MAPE definitions as the XGBoost forecasts. Because the persistence forecasts depend only on the test period, one set of metrics for each benchmark was computed per seasonal period and used as the reference for the four XGBoost configurations evaluated on that period.
For
n observations from the test set, where
denotes the actual value of hourly electricity consumption [kWh] and
the value forecasted by the model [kWh], the metrics are defined as follows:
MAE and RMSE are expressed in kWh, with RMSE penalizing large deviations more strongly, whereas MAPE describes the relative error. The metrics were reported for full periods and, as auxiliary information, for the a priori fixed peak hours 07:00–10:00 and 17:00–20:00 and for off-peak hours.
The aggregate MAE, RMSE, and MAPE values allow the configurations to be ranked by accuracy but do not resolve whether an observed difference between two configurations is statistically distinguishable. To formally compare the predictive ability of pairs of configurations, a two-sided Diebold–Mariano (DM) test [
37] was used, which tests the hypothesis of equal accuracy of two forecasts of the same quantity on the same test set.
The unit of comparison was the complete 24 h profile forecasted from a single daily forecast origin. For configuration
m and test day
d, the daily absolute loss was defined as
where
r denotes the position of the hour in the forecasted profile. For two configurations
A and
B, the series of loss differentials took the form
This formulation preserves the 31 actual forecast origins and does not treat the 744 observations belonging to different hourly horizons as a homogeneous series of forecasts at a 24 h horizon. The null hypothesis is , and the alternative hypothesis is . A positive value of the mean loss differential indicates a lower error for configuration B, and a negative value—for configuration A.
In the baseline analysis,
non-overlapping daily forecast origins were adopted, with
at the scale of successive day-ahead profiles. The statistic was computed as
where
denotes the variance of the series of daily loss differentials estimated with divisor
n. For lags
, the autocovariance was computed as
.
Due to the finite sample size, the Harvey–Leybourne–Newbold (HLN) correction was applied [
38]:
and the value
was referred to a Student’s
t distribution with
degrees of freedom. A significance level of
was adopted. As a sensitivity analysis with respect to possible autocorrelation between consecutive daily losses, a heteroskedasticity- and autocorrelation-consistent (HAC) long-run variance estimator with Bartlett weights was additionally used,
replacing
in the denominator of Equation (
7) with
. The maximum lag was determined deterministically by the rule
. The HAC analysis did not replace the baseline result but served to assess whether the conclusion of significance depends on the way the variance is estimated.
The DM test was applied only to pairs of 31 daily profiles corresponding to the same dates, hours, and actual values. Two families of comparisons were defined: eight sliding–expanding pairs at a fixed season and tuning strategy, and eight H1–H2 pairs at a fixed season and window strategy. For each family of eight tests, a sequential Holm step-down correction was applied separately to control the family-wise error rate. Both the raw p-values and the corrected values were reported, but the main conclusions were based on the values from the baseline analysis. Cross-season comparisons cover different test periods and different actual values, and are therefore presented only descriptively, without a paired DM test.
To complement the hypothesis-test results with the magnitude and uncertainty of the paired differences, the mean daily loss differential was additionally reported together with its two-sided 95% confidence interval and the standardized paired effect size Cohen’s . The confidence interval was calculated as , where is the sample standard deviation of the 31 paired daily loss differentials. Cohen’s was calculated as . Consistently with the DM definition above, positive values of and indicate lower daily loss for configuration B. The reported confidence intervals are pairwise intervals and are not adjusted for multiple comparisons; family-wise inferential conclusions therefore continue to be based on the Holm-adjusted p-values from the baseline DM-HLN analysis, with the HAC variant used as a sensitivity analysis.
2.7. Model Interpretability Analysis Using SHAP
The SHAP value
specifies the additive contribution of feature
j to the prediction for observation
[
23]:
where
F denotes the full set of input features,
S is a subset of features not containing feature
j, and
represents the expected value of the model prediction given the features in the subset
S. SHAP values satisfy the property of local additivity:
where
is the base value of the prediction and
p denotes the number of input features. A positive value of
means that the given feature increases the forecast relative to the base value, whereas a negative value indicates its lowering effect on the forecasted electricity consumption.
For XGBoost, TreeSHAP was applied [
24], and both global and local analyses were carried out [
20,
25,
29]. The recovered implementation confirmed that the local attributions were calculated through the native XGBoost prediction interface using
pred_contribs=True. Consequently, no separate
shap package,
feature_perturbation setting, or reference/background dataset was used in this implementation.
The reproducibility of the analysis was considered at two levels. The retained full matrices comprise, for each of the 16 configurations, 744 observations, values of 19 features, 19 local attributions, the forecast, and the base value. They enable independent recomputation of the global rankings, stability statistics, tables, and plots, as well as verification of the additivity equation, without rerunning the models. Together with the recovered training code, these artifacts also enabled the additional multi-seed sensitivity analysis. The serialized models from the original experiment were not retained.
The SHAP analysis was carried out separately for each of the 16 experimental configurations defined in
Section 2.4. Due to the applied walk-forward retraining, each configuration comprises 31 successive models, each of which generates a forecast for one test day. SHAP values for each observation were therefore computed using the same daily model that was used to generate the corresponding forecast. This ensures consistency of the explanation with the prediction structure of the model actually used on a given day, rather than interpreting a single model chosen after the experiment. For day
d, the corresponding base value
applied, constant for the 24 forecasts of that day. Based on the retained results, the additivity of the explanations was confirmed: the sum of
and the 19 local attributions reproduced the forecast
to a precision limited by the numerical rounding error.
For configuration
, where
, the global importance of feature
j was determined as the mean absolute SHAP value computed for all observations of its 31-day test set:
where
denotes the number of hourly forecasts in a given configuration, and
is the SHAP value of feature
j for observation
i, computed using the model in effect on the forecast day. The measure
is expressed in the units of the forecasted variable, i.e., in kWh, and describes the average absolute change in the prediction attributed to the analyzed feature in a given configuration.
Because the overall scale of SHAP values may differ between seasons and model configurations, for the purpose of comparing all configurations, normalization was applied within each configuration:
The value represents the relative contribution of feature j to the total global importance of all features in configuration v. The normalization serves exclusively for comparing the structure of importance between configurations; the interpretation of the magnitude of the contribution in physical units was based on the unnormalized values . Because the normalized shares are compositional, a change in may reflect either a change in itself or a redistribution caused by changes in the absolute SHAP magnitudes of the remaining features; normalized and absolute importance are therefore interpreted jointly.
The normalized values are presented as a joint heatmap whose columns correspond to the 16 experimental configurations and whose rows correspond to the ten features with the highest average importance across the entire experiment. The average importance aggregating the results from all configurations was defined as
The features were ordered in decreasing order of , and the ten highest-ranked variables were selected for the heatmap. This approach makes it possible to simultaneously assess the dominant predictors and the changes in their relative importance between seasons, training-window strategies, and hyperparameter tuning strategies, without presenting 16 separate importance plots.
The stability of model interpretation was evaluated based on the agreement of feature rankings between configurations. For each configuration, a rank vector
was constructed, covering all
features ordered in decreasing order of
. The agreement of two rankings, corresponding to configurations
a and
b, was determined using the Spearman rank correlation coefficient:
A value of close to 1 indicates high ranking agreement, a value close to 0 indicates the absence of monotonic agreement, and a negative value indicates opposite feature orderings. No discrete threshold classifying a ranking as stable or unstable was adopted in the study; the interpretation was based on the continuous values of the coefficient and their comparison between groups of configurations. The correlation was computed for the full set of 19 features rather than only for the variables shown in the heatmap, in order to limit the influence of an arbitrary feature-selection threshold on the assessment of agreement. To complement Spearman’s coefficient with a measure focused on the most influential predictors, pairwise Top-5 overlap was calculated as , where denotes the set of the five highest-ranked features in configuration v. Thus, denotes identical Top-5 feature sets, irrespective of their internal ordering.
In this study, the term stability denotes the descriptive agreement of rankings generated by the same TreeSHAP procedure for the analyzed models. It should not be equated with unambiguous identification of a physical mechanism or with the invariance of individual attributions in the presence of collinear predictors. In particular, features describing related phenomena, such as temperature-related variables and load lags and rolling statistics, may share or take over part of the attributed contribution depending on the structure of the trained trees. For this reason, conclusions concerning groups of features are more robust than fine differences in the ranking position of individual variables.
The stability analysis was carried out in two stages. In the first stage, the full matrix of Spearman coefficients was computed for all 16 configurations, comprising 120 unique pairs. In the second stage, 40 targeted comparisons were extracted, corresponding to the three dimensions of the experiment:
- 1.
Stability with respect to season—All pairs of the four seasons were compared separately in each of the four configuration families: sliding–H1, expanding–H1, sliding–H2, and expanding–H2. In each family, six comparisons were performed, yielding a total of 24 cross-season pairs. In the H1 families the actual hyperparameters remain fixed, whereas in the H2 families they could differ between seasons as a result of independent tuning; therefore the H2 results describe the stability of rankings between complete seasonal configurations rather than the isolated effect of the season itself. In contrast to the Diebold–Mariano test (
Section 2.6), the rank correlation can also be computed for rankings coming from different test periods.
- 2.
Stability with respect to the training-window strategy—For each season, sliding and expanding were compared separately for H1 and H2, yielding a total of eight pairs. For H1, the comparison keeps the actual hyperparameters fixed and allows the cleanest assessment of the change associated with the window strategy. For H2, both configurations belong to the same tuning strategy, but their selected hyperparameters could differ; the comparison therefore has the character of a descriptive assessment of the stability of complete configurations.
- 3.
Stability with respect to the hyperparameter tuning strategy—for each season and window type, the corresponding H1 and H2 configurations were compared: four pairs for sliding and four for expanding, eight comparisons in total.
For the full matrix, the mean, median, and range of the coefficients were reported, whereas for the 40 targeted comparisons, analogous statistics were determined separately for the three groups. The distinction between comparisons that isolate a single factor and comparisons of full configurations reduces the risk of attributing observed changes exclusively to one element of the procedure, when in the H2 configurations the actual sets of hyperparameters could differ.
Algorithmic-randomness sensitivity was evaluated separately from the across-configuration stability analysis. For each random state, global mean absolute SHAP importance and the ranking of all 19 features were recomputed. Within each stochastic configuration, the ten seed-specific rankings yielded 45 unique seed-to-seed pairs, for which Spearman’s rank correlation was calculated. Agreement among the most influential predictors was additionally checked through the overlap of the five highest-ranked features. Finally, the complete set of 120 across-configuration Spearman coefficients was recalculated separately for each random state to determine whether the main ranking-agreement result depended materially on the stochastic realization.
Uncertainty in global SHAP importance and feature rankings was additionally evaluated using a day-level block bootstrap. For each configuration, the 744 local SHAP observations were divided into the 31 complete 24 h forecast-day blocks generated by the successive daily models. A total of 10,000 bootstrap samples were generated by resampling these daily blocks with replacement. For each replicate, mean absolute SHAP importance in kWh, normalized SHAP shares, and the complete ranking of all 19 features were recalculated. The 2.5th and 97.5th percentiles of the bootstrap distribution were used as 95% percentile confidence limits for mean absolute SHAP importance. Ranking uncertainty was evaluated using Spearman correlation between each bootstrap ranking and the corresponding original ranking and by the overlap of the five highest-ranked features. For summaries averaged across the 16 configurations, the same resampled day indices were applied to the four configurations sharing a given seasonal test period, preserving their paired day structure. The bootstrap therefore quantifies uncertainty conditional on the four observed 31-day test periods and does not constitute replication across independent years or seasonal windows.
For each configuration, a matrix of 744 forecasts, actual values, base values, 19 feature values, and 19 attributions was prepared. The inspection confirmed the completeness of the data and a maximum additivity error below 0.001 kWh. The detailed local presentation was restricted to the reference S1-H1, whose feature hierarchy was consistent with the global result. The beeswarm plots show the distribution of attributions, and the dependence plots—their nonlinear direction without a causal interpretation [
34]. Two local cases from the S1-H1 configuration were selected explicitly by absolute-error criterion: the case with absolute error closest to the median was retained as a numerical reference, whereas the case with the maximum absolute error was presented on a waterfall plot for detailed diagnostic inspection.
The SHAP analysis was purely post hoc in nature. Its results were not used for feature selection, hyperparameter tuning, or modifying the models evaluated on the test sets, so that the interpretation did not influence the results of the accuracy comparison of individual configurations.