This study investigates the effectiveness of Counterfactual Explanations (CE) in improving the interpretability of short-term electricity load forecasting models. The forecasting model was developed using Random Forest Regression (RFR) due to its ability to capture nonlinear multivariate patterns in electricity load data and to provide global, descriptive interpretability through feature-importance analysis. However, feature importance provides static and potentially biased explanations, making it insufficient for instance-level interpretability. To address this limitation, the Diverse Counterfactual Explanations (DiCE) framework was integrated to generate multiple “what-if” scenarios that illustrate model-consistent input adjustments capable of shifting forecast outcomes. The study uses hourly electricity load data from Panama collected between 2015 and 2020, with data from 2020 excluded during preprocessing due to atypical demand patterns caused by COVID-19. The model was trained using time-series cross-validation and optimized through grid search. Forecasting performance was evaluated using Mean Absolute Error (MAE), Root Mean Squared Error (RMSE), and Mean Absolute Percentage Error (MAPE). Counterfactual Explanations were assessed using validity, proximity, and compactness metrics, indicating that most generated scenarios are goal-aligned and remain moderately close to the original instances, while the compactness results reflect a feasibility trade-off when large prediction shifts are required. Overall, combining RFR with counterfactual analysis enhances model transparency by bridging global and local interpretability perspectives and provides decision-relevant, scenario-based insights to support transparent and data-driven planning in the energy sector.
Copyrights © 2026