High-resolution photovoltaic power forecasting using machine learning models under seasonal and stress conditions Authors: Hany S. E. Mansour, Amira S. Mohamed, Hassan M. Hussein Farh, AL-Wesabi Ibrahim, Abdullah M. Al-Shaalan, Abdullahi Bala Kunya, Hany S. Elnashar Published: 2026 ABSTRACT Accurate short-term photovoltaic (PV) power forecasting at sub-hourly resolutions is essential for maintaining grid reliability and supporting renewable energy integration. This study benchmarks six machine learning models against a persistence baseline using high-resolution data from the Yulara Solar System (327.6 kW) resampled at 5-, 10-, and 15-minute intervals. A comprehensive preprocessing framework was developed, incorporating cyclical temporal encoding, lag and rolling statistical features, interquartile-range-based outlier filtering, and hyperparameter optimization using RandomizedSearchCV with TimeSeriesSplit. The evaluated models include XGBoost, Decision Tree, Linear Regression, Ridge, Lasso, and Elastic Net. Performance was assessed using multiple error metrics (MAE, RMSE, WAPE, SMAPE, and skill score) across training, validation, testing, seasonal subsets, and stress scenarios involving night-time and highly variable irradiance conditions. Results demonstrate that tree-based models substantially outperform linear regressors in both accuracy and robustness. The Decision Tree achieved the best overall performance, with MAE values of 0.33–0.54 kW and RMSE values of 0.82–1.65 kW, corresponding to 97–98% skill-score improvements over persistence forecasting. XGBoost also showed strong and consistent performance across temporal resolutions and seasonal variations. In contrast, linear models exhibited limited capability in capturing nonlinear PV behavior, particularly under highly variable conditions. These findings highlight the suitability of tree-based approaches for accurate, interpretable, and resilient short-term PV forecasting in smart grid applications.Supplementary InformationThe online version contains supplementary material available at 10.1038/s41598-026-56832-8. Introduction The global transition to renewable energy is a necessary response to climate change, the depletion of fossil fuel resources, and the adverse ecological consequences associated with traditional energy production1. Solar photovoltaic (PV) systems have emerged as a sustainable and cost-effective solution due to their scalability and declining costs2. However, their intermittent output, influenced by meteorological factors such as cloud cover, temperature, and humidity, alongside diurnal cycles, poses challenges for grid integration, energy market participation, and microgrid operation3. Accurate short-term PV forecasting at sub-hourly resolutions (e.g., 5, 10, or 15 min) is essential for grid stability, scheduling optimization, and economic efficiency in applications like grid interconnection and microgrid management4,5. High-resolution (5-minute) forecasts enable rapid real-time control actions, including automatic generation control, frequency regulation, and microgrid islanding decisions, where delays of only a few minutes may compromise system stability6,7. This study leverages operational data from the Yulara Solar System, a real-world 327.6 kW PV installation, to address these challenges using machine learning models. PV power forecasting is categorized by prediction horizon: ultra-short-term (minutes to hours) for real-time monitoring and control, short-term (days to weeks) for operational planning and trading, and medium- to long-term (months to years) for capacity planning and policy design8. Ultra-short-term forecasting enables rapid adjustments to maintain grid reliability, with accuracy improving at finer resolutions9. A wide range of forecasting approaches have been developed, broadly grouped into physical, statistical, machine learning (ML), deep learning (DL), and hybrid methods10. Statistical models, including regression techniques11, autoregressive integrated moving average (ARIMA) models12, and gray system theory8, are effective in identifying temporal cycles but often fall short when confronted with the nonlinear and stochastic behavior of PV generation. ML techniques, such as support vector regression (SVR)13 and light gradient boosting machine (LightGBM)14,15, have proven more capable of capturing nonlinearities and complex dynamics. DL architectures extend these capabilities further: for example, long short-term memory (LSTM) networks applied to day-ahead forecasts16, convolutional neural networks (CNN) combined with bidirectional LSTM (CNN–BiLSTM)17, and optimized convolutional LSTMs (CLSTMs)18 have demonstrated significant improvements in forecast performance. Hybrid approaches, such as integrating wavelet transforms with quantile regression neural networks (QRNNs) for probabilistic wind speed forecasting, are increasingly being adapted for PV applications as well19. Recent advancements include novel DL architecture like TimesNet20, which have been tailored for complex time-series analysis. Complementary preprocessing techniques, such as empirical mode decomposition (EMD)21, further contribute to reducing errors and improving model reliability22. Additionally, the effectiveness of both ML and DL–based forecasting is closely tied to hyperparameter optimization. Conventional methods such as grid search23 often involve high computational cost, prompting the adoption of more efficient alternatives like Bayesian optimization24. Despite these advances, most existing studies using raw meteorological and power data face inherent limitations during periods of high volatility, such as rapid cloud passages. Signal decomposition techniques (e.g., variational mode decomposition (VMD), wavelet packet decomposition (WPD)) can separate complex PV signals into more predictable intrinsic modes, improving forecast stability under stress conditions25,26. Moreover, recent attention-based architectures, including hierarchical frequency-aware transformers and hybrid transformer-BiLSTM models27,28, have shown superior capability in capturing multi-scale temporal dependencies. While such DL methods offer high accuracy, they require large datasets, extensive computational resources, and are less interpretable than tree-based models. Therefore, the present study focuses on classical machine learning models (linear, regularised, and tree-based) to establish a clear, reproducible benchmark for sub-hourly PV forecasting under seasonal and stress conditions. DL architectures, including LSTMs and transformers, are deliberately excluded to maintain focus on interpretability, computational efficiency, and practical deployability; they are left for future work. Moreover, DL models typically require substantially larger datasets (e.g., multiple years of high-frequency data from many sites) to generalize well, whereas the single-site Yulara dataset, while large, is not ideal for training deep networks without risk of overfitting. Although recent advancements in PV power forecasting have been substantial, several important research gaps remain unaddressed. Many studies, such as8,10, primarily emphasize point forecasting or a single prediction horizon, while systematic evaluations of multiple machine learning models at high temporal resolutions (e.g., 5-, 10-, and 15-minute intervals) using actual field data are still relatively limited. Furthermore, the majority of approaches rely on raw data without signal decomposition, making them vulnerable to high-volatility events25,26. Moreover, edge-case scenarios, such as periods of high variability (rapid irradiance fluctuations due to cloud cover) or night-time conditions (zero PV output), are often neglected, despite their importance for ensuring forecast robustness and reliability22. Another limitation lies in the breadth of evaluation frameworks: few studies employ a diverse set of error indicators, such as normalized RMSE (nRMSE), symmetric mean absolute percentage error (SMAPE), or skill scores, which capture different aspects of error magnitude, symmetry, and relative improvement, and visual comparative analyses are rarely incorporated to provide deeper performance insights24. Likewise, preprocessing pipelines frequently omit essential components such as advanced feature engineering and temporal encoding, constraining the adaptability of models to diverse operating conditions10. Equally important, the issue of computational efficiency in hyperparameter optimization remains insufficiently explored. Conventional approaches, such as grid search, tend to be computationally demanding, underscoring the need for more efficient optimization techniques to balance accuracy with scalability21. However, systematic multi-resolution benchmarking of machine learning models under real-world, high-variability scenarios, together with computational efficiency analysis, is still insufficiently addressed in recent literature. To address these limitations, this study develops a comprehensive framework for short-term PV power forecasting using operational data from the Yulara Solar System (327.6 kW). The dataset includes 14 measured variables, including Active Power, Wind Speed, and Pyranometer_1, and is resampled at 5-, 10-, and 15-minute intervals. First, a robust preprocessing pipeline is developed, incorporating interquartile-range-based outlier detection, cyclical temporal encoding, and lagged and rolling statistical feature engineering. Hyperparameter optimization is performed using RandomizedSearchCV combined with TimeSeriesSplit to improve computational efficiency while preserving temporal consistency. Second, six ML models, namely Decision Tree, XGBoost, Linear Regression, Ridge, Lasso, and Elastic Net, are systematically benchmarked against a persistence baseline. Emphasis is placed on tree-based approaches because of their interpretability and ability to capture nonlinear PV dynamics. Third, extensive model evaluation is conducted using diverse performance metrics, including Mean Absolute Error (MAE), Root Mean Squared Error (RMSE), normalized MAE (nMAE), nRMSE, coefficient of determination (R²), Weighted Absolute Percentage Error (WAPE), SMAPE and skill score. Evaluation is performed across training (70%), validation (15%), and testing (15%) subsets, as well as seasonal divisions and stress scenarios involving night-time and highly variable irradiance conditions. Unlike simulation-based studies, this work relies entirely on real operational field data, thereby enhancing the practical relevance and applicability of the proposed framework. The overall research workflow adopted in this study is illustrated in Fig. 1, which summarizes the main stages, including data acquisition, dataset preparation, preprocessing, model development, forecasting, and performance evaluation. In addition, Table 1 provides a comparative overview of recent solar forecasting studies and highlights the methodological position and contribution of the current work relative to existing literature. The main contributions of this study are summarized as follows: A robust and scalable preprocessing framework for short-term PV forecasting is developed, incorporating cyclical temporal encoding, lagged and rolling statistical feature engineering, and effective outlier handling to improve model stability across multiple temporal resolutions.A comprehensive multi-metric evaluation framework is established using MAE, RMSE, nMAE, nRMSE, WAPE, SMAPE, R², and skill score, combined with walk-forward validation and seasonal analysis to assess forecasting accuracy, temporal generalization, and robustness under real operational conditions.Focused stress testing is conducted under challenging operating scenarios, including night-time conditions and periods of highly variable irradiance, to evaluate the resilience and reliability of forecasting models for practical deployment.Seasonal analyses across spring, summer, autumn, and winter are performed to quantify model adaptability under varying environmental and operational conditions, reinforcing the applicability of the proposed methods for smart grid and renewable energy integration systems. A robust and scalable preprocessing framework for short-term PV forecasting is developed, incorporating cyclical temporal encoding, lagged and rolling statistical feature engineering, and effective outlier handling to improve model stability across multiple temporal resolutions. A robust and scalable preprocessing framework for short-term PV forecasting is developed, incorporating cyclical temporal encoding, lagged and rolling statistical feature engineering, and effective outlier handling to improve model stability across multiple temporal resolutions. A comprehensive multi-metric evaluation framework is established using MAE, RMSE, nMAE, nRMSE, WAPE, SMAPE, R², and skill score, combined with walk-forward validation and seasonal analysis to assess forecasting accuracy, temporal generalization, and robustness under real operational conditions. A comprehensive multi-metric evaluation framework is established using MAE, RMSE, nMAE, nRMSE, WAPE, SMAPE, R², and skill score, combined with walk-forward validation and seasonal analysis to assess forecasting accuracy, temporal generalization, and robustness under real operational conditions. Focused stress testing is conducted under challenging operating scenarios, including night-time conditions and periods of highly variable irradiance, to evaluate the resilience and reliability of forecasting models for practical deployment. Focused stress testing is conducted under challenging operating scenarios, including night-time conditions and periods of highly variable irradiance, to evaluate the resilience and reliability of forecasting models for practical deployment. Seasonal analyses across spring, summer, autumn, and winter are performed to quantify model adaptability under varying environmental and operational conditions, reinforcing the applicability of the proposed methods for smart grid and renewable energy integration systems. Seasonal analyses across spring, summer, autumn, and winter are performed to quantify model adaptability under varying environmental and operational conditions, reinforcing the applicability of the proposed methods for smart grid and renewable energy integration systems. The remainder of this paper is organized as follows. Section 2 describes the methodology, including the dataset, preprocessing procedures, forecasting models, and evaluation strategy. Section 3 presents experimental results and discussion. Finally, Sect. 4 concludes the paper and outlines directions for future research. Fig. 1Research methodology. Research methodology. Table 1Research overview of solar forecasting methods.ReferenceStudy ScaleHorizonMethodologyMain ContributionKacem et al. (2023)29RegionalVery short-termMLR, ANNReduced nRMSE(kW); simple to implement but limited adaptabilityMawloud et al. (2024)30RegionalShort-termMulti-frequency CNN hybridHigh precision; optimizes energy integration; complex trainingMawloud et al. (2024)31Single-site–Hybrid methodsImproved solar assessment; strong performance under varied conditions; high complexityReski et al. (2024)32RegionalReal-time (30 min)TVF-EMD-ELMEstimates intra-hour variations; good for real-time use; sensitive to fluctuationsYiling et al. (2024)33RegionalShort-termCPO-CLARobust, stable predictions; good for grid integration; needs optimizer tuningJean et al. (2024)34RegionalShort-termBayesian Optimized LSTMHigh precision; effective data filtering; complex setupPablo et al. (2024)35RegionalShort-termLGB, KNNLGB achieves high R²; simple & interpretable; limited multi-site applicabilityMariam et al. (2024)36RegionalShort-term (15 min)ML statistical hybridSuperior accuracy; integrates ML & statistical methods; requires high-quality dataNadeem et al. (2024)37RegionalShort-termML, DL, hybrid modelsHigh accuracy; improves grid reliability; resource-intensiveBisoye et al. (2024)38RegionalShort-termANN, SVM, genetic algorithmsHigh optimization potential; versatile; complex model tuningPengtao et al. (2024)39Single-siteShort-term (5 min)Hybrid WPD-LSTMSuperior accuracy; handles non-linear data; complex structureSleiman Farah et al. (2023)40Single-siteShort-term (5 min)Fourier seriesOutperforms CSIP in nMAE(kW); low short-term error; limited long-term accuracyWu et al. (2025)41Single-siteShort-termTimeGAN-MLPIEnhanced multiscale feature extraction and improved small-sample learning quality.Guo et al. (2025)42Single-siteUltra-short-term (15 min)ET-EEMD-GRUAchieved nRMSE (kW) = 2.37%; sky-image integration reduced nRMSE(kW) by 38.3%, while purification reduced runtime by 26.4%.Silva et al. (2025)43Large-scale PV plantAnomaly detectionRandom Forest RegressorAchieved 99.69% accuracy for inverter anomaly detection; reduced manual intervention in real PV monitoring systems.Xu et al. (2025)44Regional microgridShort-term PV & load forecasting (for energy management)Transfer Learning–enhanced Reinforcement LearningReduced operational costs by 62.63% and improved system balance by 80%; faster and more stable training.Babu et al. (2025)45Single-siteShort-termML regressors, Ensemble modelsGradient Boosting achieved best performance (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{R}^{2}=0.827$$\end{document}); strong feature engineering for practical smart-grid deployment.Ferkous et al. (2025)25single-siteShort-termVMD + Swarm Decomposition + LSTM reconstructionAchieved \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{R}^{2}$$\end{document} up to 99.84%; two-stage decomposition improved separation of high-frequency fluctuations and forecasting accuracy.Wang et al. (2025)28Two sites (China)Short-term (dar y-ahead)VMD + Transformer-BiLSTMImproved convergence and avoided local optima; achieved low MAE and RMSE across distinct PV stations.Alwesabi et al. (2026)46Single‑site (Yemen)Short-term (hourly)Dual-attention BiGRU with hybrid arithmetic fire hawk optimizerAchieved \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{R}^{2}=0.998$$\end{document}, MAE = 0.0453, RMSE = 0.0598; significantly outperformed conventional DL baselines.Ferkous et al. (2026)26Single-site (Algeria)Short-term (30 min ahead)Hybrid VMD-WPD-LSTMAchieved \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{R}^{2}=99.75\mathrm{\%}$$\end{document}and nRMSE = 1.43%; substantially outperformed baseline LSTM models.Ferkous et al. (2026)27Two sites (Algeria)Short-term and multi-horizonHybrid VMD-WPD-LSTMReduced RMSE and nRMSE significantly through hierarchical frequency-aware Transformer architecture.Current StudySingle‑site (Australia)Ultra-short-term (5, 10, 15 min)Benchmarking of six ML models (XGBoost, Decision Tree, Linear, Ridge, Lasso, Elastic Net) against persistenceDecision Tree achieved the lowest MAE (0.33–0.54 kW) and skill scores of 97–98% over persistence; XGBoost demonstrated robust seasonal generalization. The study provides the first systematic multi-resolution benchmark of traditional ML models under seasonal and stress-test scenarios using a high-quality 9 + year dataset. Table 1Research overview of solar forecasting methods.ReferenceStudy ScaleHorizonMethodologyMain ContributionKacem et al. (2023)29RegionalVery short-termMLR, ANNReduced nRMSE(kW); simple to implement but limited adaptabilityMawloud et al. (2024)30RegionalShort-termMulti-frequency CNN hybridHigh precision; optimizes energy integration; complex trainingMawloud et al. (2024)31Single-site–Hybrid methodsImproved solar assessment; strong performance under varied conditions; high complexityReski et al. (2024)32RegionalReal-time (30 min)TVF-EMD-ELMEstimates intra-hour variations; good for real-time use; sensitive to fluctuationsYiling et al. (2024)33RegionalShort-termCPO-CLARobust, stable predictions; good for grid integration; needs optimizer tuningJean et al. (2024)34RegionalShort-termBayesian Optimized LSTMHigh precision; effective data filtering; complex setupPablo et al. (2024)35RegionalShort-termLGB, KNNLGB achieves high R²; simple & interpretable; limited multi-site applicabilityMariam et al. (2024)36RegionalShort-term (15 min)ML statistical hybridSuperior accuracy; integrates ML & statistical methods; requires high-quality dataNadeem et al. (2024)37RegionalShort-termML, DL, hybrid modelsHigh accuracy; improves grid reliability; resource-intensiveBisoye et al. (2024)38RegionalShort-termANN, SVM, genetic algorithmsHigh optimization potential; versatile; complex model tuningPengtao et al. (2024)39Single-siteShort-term (5 min)Hybrid WPD-LSTMSuperior accuracy; handles non-linear data; complex structureSleiman Farah et al. (2023)40Single-siteShort-term (5 min)Fourier seriesOutperforms CSIP in nMAE(kW); low short-term error; limited long-term accuracyWu et al. (2025)41Single-siteShort-termTimeGAN-MLPIEnhanced multiscale feature extraction and improved small-sample learning quality.Guo et al. (2025)42Single-siteUltra-short-term (15 min)ET-EEMD-GRUAchieved nRMSE (kW) = 2.37%; sky-image integration reduced nRMSE(kW) by 38.3%, while purification reduced runtime by 26.4%.Silva et al. (2025)43Large-scale PV plantAnomaly detectionRandom Forest RegressorAchieved 99.69% accuracy for inverter anomaly detection; reduced manual intervention in real PV monitoring systems.Xu et al. (2025)44Regional microgridShort-term PV & load forecasting (for energy management)Transfer Learning–enhanced Reinforcement LearningReduced operational costs by 62.63% and improved system balance by 80%; faster and more stable training.Babu et al. (2025)45Single-siteShort-termML regressors, Ensemble modelsGradient Boosting achieved best performance (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{R}^{2}=0.827$$\end{document}); strong feature engineering for practical smart-grid deployment.Ferkous et al. (2025)25single-siteShort-termVMD + Swarm Decomposition + LSTM reconstructionAchieved \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{R}^{2}$$\end{document} up to 99.84%; two-stage decomposition improved separation of high-frequency fluctuations and forecasting accuracy.Wang et al. (2025)28Two sites (China)Short-term (dar y-ahead)VMD + Transformer-BiLSTMImproved convergence and avoided local optima; achieved low MAE and RMSE across distinct PV stations.Alwesabi et al. (2026)46Single‑site (Yemen)Short-term (hourly)Dual-attention BiGRU with hybrid arithmetic fire hawk optimizerAchieved \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{R}^{2}=0.998$$\end{document}, MAE = 0.0453, RMSE = 0.0598; significantly outperformed conventional DL baselines.Ferkous et al. (2026)26Single-site (Algeria)Short-term (30 min ahead)Hybrid VMD-WPD-LSTMAchieved \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{R}^{2}=99.75\mathrm{\%}$$\end{document}and nRMSE = 1.43%; substantially outperformed baseline LSTM models.Ferkous et al. (2026)27Two sites (Algeria)Short-term and multi-horizonHybrid VMD-WPD-LSTMReduced RMSE and nRMSE significantly through hierarchical frequency-aware Transformer architecture.Current StudySingle‑site (Australia)Ultra-short-term (5, 10, 15 min)Benchmarking of six ML models (XGBoost, Decision Tree, Linear, Ridge, Lasso, Elastic Net) against persistenceDecision Tree achieved the lowest MAE (0.33–0.54 kW) and skill scores of 97–98% over persistence; XGBoost demonstrated robust seasonal generalization. The study provides the first systematic multi-resolution benchmark of traditional ML models under seasonal and stress-test scenarios using a high-quality 9 + year dataset. Research overview of solar forecasting methods. Short-term (30 min ahead) Methodology Dataset The analysis in this study is based on a solar PV dataset collected from the Yulara Solar System36 located adjacent to Uluru in central Australia. The study focuses on a subsystem with a rated capacity of 327.6 kW. The dataset comprises 964,421 records and includes 15 variables: timestamp, active power, wind speed, ambient temperature (°C), global horizontal radiation, wind direction, daily rainfall, maximum wind speed, atmospheric pressure, hail accumulation, Pyranometer_1, Temperature_Probe_1, Temperature_Probe_2, Current_Phase_Average, and cumulative active energy delivered and received. The timestamp variable was used as the temporal index. The dataset spans from April 2, 2016 (08:00:00) to July 16, 2025 (16:30:00), corresponding to approximately 9.29 years of historical operational data. Although the endpoint extends beyond the current calendar date, it reflects the complete temporal coverage contained in the source dataset. An initial data integrity assessment identified 12,578 missing intervals at the native 5-minute resolution, representing approximately 1.29% of the expected 976,999-time steps. Several intermittent gaps were observed throughout the dataset, including missing intervals between July 17, 2016, and September 28, 2020. To preserve temporal causality and prevent information leakage, the dataset was first divided chronologically into training (70%), validation (15%), and testing (15%) subsets. Missing timestamps were subsequently handled during the imputation stage described in Sect. 2.2. Separate experiments were conducted for each target temporal resolution (5, 10, and 15 min). In each case, the raw dataset was first partitioned chronologically, after which each subset was independently resampled to the corresponding temporal resolution using mean aggregation. Following resampling, several feature columns (e.g., ambient temperature and global horizontal radiation) still contain sparse NaN values, particularly near the end of the dataset. These missing values were addressed during the imputation stage described in Sect. 2.2. Table 2 provides a comprehensive overview of dataset dimensions across the chronological splits and independently resampled partitions, highlighting variations introduced by temporal resampling and gap handling within each subset. Table 2Dataset splitting and resampling results.DatasetOriginal Shape (5-min native)Resampled (5-min, gap-filled)Resampled (10-min)Resampled (15-min)Training(675094, 14)(675959, 14)(337980, 14)(225320, 14)Validation(144663, 14)(150558, 14)(75280, 14)(50187, 14)Testing(144664, 14)(150482, 14)(75242, 14)(50162, 14)Total(964,421, 14)(976,999, 14)(488,502, 14)(325,669, 14)Dataset shapes exclude the timestamp column, which was used as the index. Resampling automatically introduced NaN values for missing timestamps, which were subsequently imputed. Table 2Dataset splitting and resampling results.DatasetOriginal Shape (5-min native)Resampled (5-min, gap-filled)Resampled (10-min)Resampled (15-min)Training(675094, 14)(675959, 14)(337980, 14)(225320, 14)Validation(144663, 14)(150558, 14)(75280, 14)(50187, 14)Testing(144664, 14)(150482, 14)(75242, 14)(50162, 14)Total(964,421, 14)(976,999, 14)(488,502, 14)(325,669, 14)Dataset shapes exclude the timestamp column, which was used as the index. Resampling automatically introduced NaN values for missing timestamps, which were subsequently imputed. Dataset splitting and resampling results. Dataset shapes exclude the timestamp column, which was used as the index. Resampling automatically introduced NaN values for missing timestamps, which were subsequently imputed. Preprocessing The preprocessing framework followed a strict, temporally consistent workflow to ensure reproducibility and prevent information leakage. Operations requiring parameter estimation, such as outlier threshold calculation and feature scaling, were derived exclusively from the training subset and subsequently applied to the validation and testing subsets. In contrast, partition-independent transformations, including temporal feature extraction, lag construction, rolling statistics, clipping, and imputation, were performed separately within each dataset partition using only information available within that partition. Step (1) Chronological split into training, validation, and test sets. Immediately after loading the raw dataset, the observations were partitioned chronologically to prevent future information from leaking into the training process. Maintaining the temporal sequence of observations is essential in time-series forecasting because it ensures that the model is trained exclusively on historical data and evaluated using unseen future observations. To preserve methodological rigor, the chronological order of the dataset was maintained throughout all preprocessing and modeling stages. The dataset was divided into three subsets. The training subset comprised 70% of the observations and was used for model training and parameter estimation. The validation subset accounted for 15% of the data and was used for hyperparameter tuning and performance monitoring during model development. The remaining 15% constituted the testing subset, which was reserved exclusively for final evaluation of predictive performance. Step (2) – Resampling to standardize temporal resolution. Following chronological partitioning, each subset (training, validation, and testing) was independently resampled to target resolutions of 5, 10, and 15 min using mean aggregation. This process standardized the temporal index and automatically generated rows corresponding to missing timestamps, resulting in NaN values where observations were unavailable. The aggregation interval represented the only variation across the three sampling schemes. To maintain methodological consistency, the same preprocessing framework, feature engineering procedures, and variable selection strategy were applied across all temporal resolutions. Step (3) – Outlier detection, clipping, and imputation. Outlier handling for the Active_Power variable was performed exclusively on the training subset using the interquartile range (IQR) method with a threshold of 1.5 × IQR. Observations located more than 1.5 × IQR below the first quartile or above the third quartile were identified as outliers and subsequently replaced with missing values. To maintain methodological consistency and prevent information leakage, the same outlier thresholds derived from the training subset were applied unchanged to the validation and testing subsets. To ensure the physical plausibility of the measurements, several clipping constraints were implemented before the imputation stage. Wind- and irradiance-related variables, including Wind_Speed, Max_Wind_Speed, Global_Horizontal_Radiation, Pyranometer_1, Weather_Daily_Rainfall, and Hail_Accumulation, were restricted to non-negative values. Temperature probe measurements were capped at 60 °C to eliminate unrealistic readings, while Wind_Direction values were constrained to the valid range of 0°–360°. In addition, irradiance-related variables were bounded to a maximum value of 1200 W/m². Any measurement below − 100, except for Active_Power, was considered invalid and treated as a missing value. Missing values within the training subset were imputed using time-aware interpolation restricted exclusively to the training partition, ensuring that no information outside the training period was introduced. This was followed by forward filling to preserve temporal continuity. For the validation and testing subsets, only forward filling was applied, while interpolation was intentionally excluded to avoid potential information leakage. Furthermore, constant-valued features, defined as variables containing only a single unique value within the training subset, were removed from all dataset partitions. This step reduced data dimensionality and minimized the risk of model overfitting. Step (4) – Feature engineering (temporal, lag, and rolling features). To improve forecasting performance, several features were engineered independently within each dataset partition while ensuring that only locally available information was used. This approach preserved temporal integrity and prevented information leakage between the training, validation, and testing subsets. Temporal features were generated to capture daily and seasonal patterns within the time-series data. These features included hour of day and day of year, together with their sinusoidal and cosinusoidal transformations (hour_sin, hour_cos, day_sin, and day_cos). The cyclical transformations enabled the models to better represent periodic behaviors associated with diurnal and annual variations. In addition, lag-based features were generated from the Active_Power variable to incorporate historical dependencies into the forecasting process. Three lag features were constructed using lag intervals of 1-, 12-, and 288-time steps. Because lagging was performed after resampling, the effective temporal duration represented by each lag depended on the sampling resolution. For example, under the 5-minute resolution, the lag features corresponded to 5 min, 1 h, and 24 h, respectively, whereas under the 15-minute resolution they represented 15 min, 3 h, and 72 h. Rolling statistical features were also introduced to capture short-term temporal trends and smoothing effects in the PV generation data. These included Active_Power_rolling_mean_12 and Active_Power_rolling_mean_288, representing moving averages computed over the previous 12- and 288-time steps, respectively. Because these rolling windows were applied after resampling, their effective temporal durations varied according to the sampling resolution. To prevent information leakage, all rolling statistics were shifted by one time step so that the current observation was excluded from feature construction. Finally, rows containing missing values generated during lagging or shifting operations were removed to ensure data completeness and consistency across all dataset partitions. Step (5) – Feature selection, scaling, and explicit prevention of data leakage. Feature selection using the SelectKBest method with the f_regression criterion was embedded within the model training pipeline and evaluated using a 5-fold TimeSeriesSplit cross-validation strategy. Feature selection was performed on scaled training features within each cross-validation fold to ensure consistent feature ranking under normalized distributions. This approach ensured that feature selection was conducted independently within each training fold, thereby preserving temporal order and preventing information leakage from future observations. For each fold, the top 15 predictors were selected according to their f_regression scores. Feature-selection stability was subsequently analysed by identifying predictors consistently selected across cross-validation folds. The features consistently identified across the folds included Wind_Speed, Active_Power_rolling_mean_12, Pyranometer_1, Active_Power_lag_12, hour_cos, Active_Power_lag_1, Max_Wind_Speed, Temperature_Probe_1, Temperature_Probe_2, Global_Horizontal_Radiation, Weather_Temperature_Celsius, Active_Power_rolling_mean_288, Wind_Direction, Active_Power_lag_288, and hour_sin. The value of k = 15 was determined through preliminary experiments to provide an effective balance between predictive performance and model complexity. Following feature selection, the target variable (Active_Power) was separated from the predictor variables, resulting in the feature matrices X_train, X_val, and X_test, together with the corresponding target vectors y_train, y_val, and y_test. Feature scaling was subsequently applied using MinMaxScaler, which normalized all variables to the range [0, 1]. The scaler was fitted exclusively on the training subset and then applied to transform the validation and testing subsets. This procedure ensured that no information from unseen data contributed to the scaling parameters, thereby preventing information leakage. Several additional measures were implemented throughout preprocessing and model development to preserve temporal integrity and avoid information leakage. Hyperparameter optimization using RandomizedSearchCV was conducted exclusively within the training subset using TimeSeriesSplit cross-validation to maintain chronological order. Similarly, walk-forward validation, described in Sect. 3.6, was performed exclusively on the training subset. Furthermore, all preprocessing parameters associated with imputation, feature engineering, feature selection, and scaling were derived exclusively from the training subset before being applied to the validation and testing subsets. Figure 2 summarizes the complete Preprocessing workflow. The proposed preprocessing pipeline provides a robust, consistent, and temporally rigorous framework for model development and evaluation. The methodology ensures reproducibility, scalability across multiple temporal resolutions, and strict independence between the training, validation, and testing subsets, thereby supporting reliable and unbiased predictive performance assessment. Fig. 2Preprocessing framework. Preprocessing framework. Models In this study, six machine learning algorithms, namely eXtreme Gradient Boosting (XGBoost), Decision Tree Regressor, Linear Regression, Ridge Regression, Lasso Regression, and Elastic Net, were systematically evaluated against a persistence model used as the baseline benchmark. The persistence model predicts Active_Power using a fixed lag of 288-time steps, corresponding to 1 day at 5-minute resolution, 2 days at 10-minute resolution, and 3 days at 15-minute resolution. A fixed lag of 288 steps was selected instead of conventional 1-hour or 24-hour persistence baselines to provide a consistent step-based benchmark across all temporal resolutions. In addition, the corresponding multi-day forecasting horizons better capture persistent weather patterns, such as consecutive cloudy periods, which are relevant under seasonal stress conditions. A shorter persistence horizon, such as 1 h, would produce unrealistically low forecasting errors because of strong short-term autocorrelation, thereby artificially inflating skill scores and reducing the rigor of the benchmark. For comparison purposes, a conventional 24-hour persistence baseline was also evaluated, and the corresponding results are provided in Table S1 of the Supplementary Materials. The modeling framework followed a structured pipeline integrating feature selection using SelectKBest (k = 15, f_regression criterion) to maintain consistency with the preprocessing framework while retaining the most statistically significant predictors. Hyperparameter optimization was conducted using RandomizedSearchCV combined with 5-fold TimeSeriesSplit cross-validation to preserve temporal ordering and minimize information leakage. RandomizedSearchCV was selected over Bayesian optimization for three primary reasons. First, the hyperparameter search spaces presented in Table 3 are relatively low dimensional, allowing random sampling with 15–25 iterations to identify near-optimal configurations efficiently. Second, RandomizedSearchCV supports parallel execution across cross-validation folds, thereby reducing total tuning time compared with sequential Bayesian approaches. Third, its stochastic search strategy, combined with a fixed random seed, ensures reproducible results without the additional complexity associated with surrogate modeling. Nevertheless, Bayesian optimization remains a promising direction for future work involving larger models or more complex hyperparameter spaces. For XGBoost, early stopping with 10 rounds was implemented to reduce the risk of overfitting. The explored hyperparameter search spaces for each algorithm are summarized in Table 3, while the optimized configurations and corresponding tuning times are presented in Table 4. Model performance was evaluated across forecasting intervals of 5, 10, and 15 min to examine the adaptability of the tuning process under different temporal resolutions. Table 3Hyperparameter ranges for model tuning.ModelHyperparameterRange/ValuesNumber of IterationsXGBoostn_estimators[100, 200, 300]15max_depth[3, 5, 7]learning_rate[0.01, 0.05, 0.1]subsample[0.8, 1.0]colsample_bytree[0.8, 1.0]Decision Treemax_depth[5, 10, 15]15min_samples_split[2, 5, 10]min_samples_leaf[1, 2, 4]Linear Regression(No tuning parameters)-1Ridge Regressionalpha[0.01, 0.1, 1.0, 10.0, 100.0]5Lasso Regressionalpha[0.01, 0.1, 1.0, 10.0, 100.0]5Elastic Netalpha[0.01, 0.1, 1.0, 10.0, 100.0]15l1_ratio[0.1, 0.5, 0.9, 1.0]Linear Regression required no hyperparameter tuning because of its fixed configuration. Table 3Hyperparameter ranges for model tuning.ModelHyperparameterRange/ValuesNumber of IterationsXGBoostn_estimators[100, 200, 300]15max_depth[3, 5, 7]learning_rate[0.01, 0.05, 0.1]subsample[0.8, 1.0]colsample_bytree[0.8, 1.0]Decision Treemax_depth[5, 10, 15]15min_samples_split[2, 5, 10]min_samples_leaf[1, 2, 4]Linear Regression(No tuning parameters)-1Ridge Regressionalpha[0.01, 0.1, 1.0, 10.0, 100.0]5Lasso Regressionalpha[0.01, 0.1, 1.0, 10.0, 100.0]5Elastic Netalpha[0.01, 0.1, 1.0, 10.0, 100.0]15l1_ratio[0.1, 0.5, 0.9, 1.0]Linear Regression required no hyperparameter tuning because of its fixed configuration. Hyperparameter ranges for model tuning. Linear Regression required no hyperparameter tuning because of its fixed configuration. Table 4Best Hyperparameters and tuning times.ModelIntervalTuning Time (s)Best HyperparametersXGBoost5 min231.09{‘subsample’: 1.0, ‘n_estimators’: 100, ‘max_depth’: 5, ‘learning_rate’: 0.05, ‘colsample_bytree’: 1.0}10 min125.30{‘subsample’: 1.0, ‘n_estimators’: 100, ‘max_depth’: 5, ‘learning_rate’: 0.05, ‘colsample_bytree’: 1.0}15 min92.47{‘subsample’: 1.0, ‘n_estimators’: 100, ‘max_depth’: 5, ‘learning_rate’: 0.05, ‘colsample_bytree’: 1.0}Decision Tree5 min206.78{‘min_samples_split’: 10, ‘min_samples_leaf’: 4, ‘max_depth’: 10}10 min100.40{‘min_samples_split’: 5, ‘min_samples_leaf’: 2, ‘max_depth’: 10}15 min66.98{‘min_samples_split’: 5, ‘min_samples_leaf’: 4, ‘max_depth’: 10}Linear Regression5 min0.52None (no tuning required)10 min0.23None (no tuning required)15 min0.13None (no tuning required)Ridge Regression5 min3.53{‘alpha’: 0.01}10 min1.89{‘alpha’: 1.0}15 min1.23{‘alpha’: 1.0}Lasso Regression5 min10.41{‘alpha’: 0.01}10 min4.92{‘alpha’: 0.01}15 min3.35{‘alpha’: 0.01}Elastic Net5 min24.23{‘l1_ratio’: 1.0, ‘alpha’: 0.01}10 min12.98{‘l1_ratio’: 1.0, ‘alpha’: 0.01}15 min7.25{‘l1_ratio’: 1.0, ‘alpha’: 0.01}Tuning times reflect the computational cost associated with hyperparameter optimization. Linear Regression was excluded from tuning because of its fixed configuration. Table 4Best Hyperparameters and tuning times.ModelIntervalTuning Time (s)Best HyperparametersXGBoost5 min231.09{‘subsample’: 1.0, ‘n_estimators’: 100, ‘max_depth’: 5, ‘learning_rate’: 0.05, ‘colsample_bytree’: 1.0}10 min125.30{‘subsample’: 1.0, ‘n_estimators’: 100, ‘max_depth’: 5, ‘learning_rate’: 0.05, ‘colsample_bytree’: 1.0}15 min92.47{‘subsample’: 1.0, ‘n_estimators’: 100, ‘max_depth’: 5, ‘learning_rate’: 0.05, ‘colsample_bytree’: 1.0}Decision Tree5 min206.78{‘min_samples_split’: 10, ‘min_samples_leaf’: 4, ‘max_depth’: 10}10 min100.40{‘min_samples_split’: 5, ‘min_samples_leaf’: 2, ‘max_depth’: 10}15 min66.98{‘min_samples_split’: 5, ‘min_samples_leaf’: 4, ‘max_depth’: 10}Linear Regression5 min0.52None (no tuning required)10 min0.23None (no tuning required)15 min0.13None (no tuning required)Ridge Regression5 min3.53{‘alpha’: 0.01}10 min1.89{‘alpha’: 1.0}15 min1.23{‘alpha’: 1.0}Lasso Regression5 min10.41{‘alpha’: 0.01}10 min4.92{‘alpha’: 0.01}15 min3.35{‘alpha’: 0.01}Elastic Net5 min24.23{‘l1_ratio’: 1.0, ‘alpha’: 0.01}10 min12.98{‘l1_ratio’: 1.0, ‘alpha’: 0.01}15 min7.25{‘l1_ratio’: 1.0, ‘alpha’: 0.01}Tuning times reflect the computational cost associated with hyperparameter optimization. Linear Regression was excluded from tuning because of its fixed configuration. Best Hyperparameters and tuning times. Tuning times reflect the computational cost associated with hyperparameter optimization. Linear Regression was excluded from tuning because of its fixed configuration. XGBoost The XGBoost algorithm, first presented in 201638, is a highly optimized implementation of the gradient boosting framework. It operates as an ensemble learning technique in which multiple weak learners, typically shallow decision trees, are combined to construct a robust predictive model. Through a sequential learning strategy, each newly generated tree attempts to correct the residual errors produced by previous trees, thereby improving predictive accuracy while maintaining computational efficiency and scalability. These characteristics make XGBoost particularly suitable for large-scale, high-dimensional, and complex datasets. At its core, XGBoost follows supervised learning principles by learning relationships between input features and target outputs to generalize effectively to unseen data. The algorithm can be applied to both regression and classification problems. Its methodological foundation lies in gradient boosting, where trees are constructed sequentially to minimize residual prediction errors from preceding iterations. As illustrated in Fig. 3, the process begins with an initial model, after which subsequent trees progressively reduce the prediction error by modeling the residuals. This iterative refinement continues until a stopping criterion or convergence condition is satisfied. The final prediction is obtained as the cumulative sum of the contributions from all trees within the ensemble. Fig. 3The Supervised Learning Process of XGBoost. The Supervised Learning Process of XGBoost. The procedure can be interpreted as an iterative refinement process, beginning with an initial prediction, commonly initialized to zero, after which successive trees are incrementally introduced to reduce the residual errors. Mathematically, the model can be expressed as:1\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\widehat{y}}_{i}={\sum\:}_{k=1}^{K}{f}_{k}\left({x}_{i}\right)$$\end{document} where, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\widehat{y}}_{i}$$\end{document} denotes the final predicted output for the ith data instance, K represents the total number of trees in the ensemble, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{f}_{k}\left({x}_{i}\right)$$\end{document} corresponds to the prediction generated by the Kth tree for the same data point. In XGBoost, the optimization objective is composed of two components: the loss function and a regularization term. The loss function evaluates the degree of fit between the model’s predictions and the observed data, while the regularization term penalizes overly complex trees to encourage simpler, more generalizable structures. The generic formulation of the objective function (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:obj\left(\theta\:\right)$$\end{document}) can be written as:2\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:obj\left(\theta\:\right)={\sum\:}_{i}^{n}l\left({y}_{i}{\widehat{,y}}_{i}\right)+\sum\:_{k=1}^{K}\varOmega\:\left({f}_{k}\right)$$\end{document} where, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:l\left({y}_{i}{\widehat{,y}}_{i}\right)$$\end{document} represents the loss function, which quantifies the discrepancy between the actual value \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{y}_{i}$$\end{document} and the model’s prediction \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\widehat{y}}_{i}$$\end{document}, while \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\varOmega\:\left({f}_{k}\right)$$\end{document} denotes the regularization component designed to penalize excessive model complexity and prevent overfitting. Rather than constructing the entire model in a single step, XGBoost adopts an iterative optimization strategy. The process begins with an initial prediction, typically set as \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\widehat{y}}_{i}$$\end{document}(0) = 0. At each subsequent iteration, a new tree is introduced to refine the model and reduce residual errors. The prediction for the ith data point after the addition of the tth tree can therefore be expressed as:3\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\widehat{y}}_{i}^{\left(t\right)}={\widehat{y}}_{i}^{\left(t-1\right)}+{f}_{t}\left({x}_{i}\right)$$\end{document} In this expression, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\widehat{y}}_{i}^{\left(t-1\right)}\:$$\end{document}denotes the prediction obtained from the previous iteration, while \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{f}_{t}\left({x}_{i}\right)$$\end{document} represents the output of the tth tree for the ith data instance. The regularization component, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\varOmega\:\left({f}_{k}\right)$$\end{document}, serves to control model complexity by introducing penalties related to both the number of leaves in a decision tree and the magnitude of the leaf weights. Its general formulation can be expressed as:4\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\Omega\:}\left({f}_{t}\right)=\:\gamma\:T\:+\frac{1}{2}\lambda\:\:\sum\:_{j=1}^{T}{w}_{j}^{2}$$\end{document} where, T denotes the total number of leaves in the tree, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\gamma\:$$\end{document}represents a regularization parameter that regulates the complexity of the tree structure, and λ corresponds to the coefficient applied to penalize the squared magnitude of the leaf weights wj. When constructing the tree, the decision on how to split a node is guided by the computation of the information gain for each potential division. The information gain associated with a candidate split is defined as:5\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Gain\:=\frac{1}{2}\:\left[\frac{{G}_{L}^{2}}{{H}_{L}+\lambda\:}+\frac{{G}_{R}^{2}}{{H}_{R}+\lambda\:}-\frac{{\left({G}_{L}+{G}_{R}\right)}^{2}}{{H}_{R}+{H}_{L}+\lambda\:}\right]-\gamma\:$$\end{document} where, GL and GR represent the aggregated gradient values for the left and right child nodes, respectively, while HL and HR denote the corresponding sums of the second-order derivatives. By evaluating the information gain across all potential splits at each node, XGBoost systematically identifies the split that maximizes this gain. This selection strategy ensures that the chosen partition yields the greatest reduction in prediction error, thereby enhancing the overall performance and accuracy of the model. Decision tree regressor Decision Tree Regression is a predictive modeling technique that employs a hierarchical tree structure to estimate continuous target values. The method recursively partitions the dataset into smaller subsets using feature-based thresholds selected to minimize prediction error. At each decision node, the algorithm determines both the optimal feature and the corresponding split threshold that maximize error reduction within the resulting partitions. This recursive process continues until predefined stopping criteria are satisfied, ultimately producing a tree in which each terminal node corresponds to a constant output value assigned to all observations within that region. Fig. 4The structure of a decision tree regressor. The structure of a decision tree regressor. As illustrated in Fig. 4, a Decision Tree Regressor consists of three main components: the Root Node, representing the complete dataset at the initial stage; the Split Nodes, which partition the data according to feature thresholds to reduce prediction error; and the Leaf Nodes, which assign constant prediction values to the final partitions. Decision trees are particularly effective in modeling complex and nonlinear relationships without assuming linearity, thereby providing flexible and interpretable predictions through transparent decision rules. However, a key limitation of decision trees is their tendency to overfit when the tree becomes excessively deep or contains too many splits, reducing generalization capability. To mitigate this issue, regularization techniques such as pruning and constraints on maximum tree depth or minimum samples per leaf are commonly applied to balance predictive accuracy and model complexity. Linear regression Linear Regression is a fundamental supervised learning algorithm that models the relationship between predictor variables and a target variable using an optimized linear function. The method assumes a proportional linear relationship between independent and dependent variables. Its simplicity, interpretability, and computational efficiency make it one of the most widely used predictive techniques and a foundational component of more advanced models, including logistic regression and neural networks. Owing to these characteristics, Linear Regression has broad applications in domains such as finance, healthcare, and energy forecasting.The equation describing the best-fit line in simple linear regression is given by:6\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\widehat{y}=\:{\beta\:}_{0}+{\beta\:}_{1}x$$\end{document} where, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\hat y}$$\end{document} denotes the predicted outcome of the dependent variable, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:x$$\end{document} represents the independent variable, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\beta\:}_{1}$$\end{document} corresponds to the slope of the line (capturing the rate of change in \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\widehat{y}$$\end{document} for each unit variation in \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:x$$\end{document}), and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\beta\:}_{0}$$\end{document} refers to the intercept, which reflects the expected value of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\widehat{y}$$\end{document} when \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:x$$\end{document} = 0. The best-fit line is obtained by minimizing the residual sum of squares Errors (SSE):7\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:SSE = \:\sum\limits_{{i = 1}}^{n} {\left( {y_{i} - \hat{y}_{i} } \right)^{2} }$$\end{document} where the residual represents the difference between the actual observed values and the corresponding predictions. To determine the best-fit line, the Least Squares method is commonly employed, minimizing squared deviations between the estimated line and observed data, thereby ensuring the most accurate approximation. For multiple linear regression, where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:k$$\end{document} independent variables are considered, the hypothesis function is generalized as:8\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$h\left( {x_{1} ,\;x_{2} , \ldots x_{k} } \right) = \beta _{0} + \beta _{1} x_{1} + \beta _{2} x_{2} + \ldots + \beta _{k} x_{k}$$\end{document} In this expression, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:h(x$$\end{document}) denotes the predicted value of the dependent variable, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\beta\:}_{0}$$\end{document} is the intercept term, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\beta\:}_{1}$$\end{document},\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\:{\beta\:}_{2}$$\end{document}, …, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\beta\:}_{k}$$\end{document} are regression coefficients capturing the contributions of each independent variable. Ridge regression Ridge Regression, also known as L2 regularization, extends ordinary linear regression by incorporating a penalty term into the optimization objective to mitigate multicollinearity and reduce overfitting. This regularization constrains the magnitude of the regression coefficients, shrinking them toward zero and thereby improving model stability and generalization performance. The linear regression model is expressed as:9\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:y=X\beta\:+\epsilon$$\end{document} where, y denotes the n×1 vector of observed target values, X represents the n×p matrix of predictor variables, β is the p×1 vector of regression coefficients, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\epsilon$$\end{document} corresponds to the n×1 error vector. The OLS estimator of β is given by:10\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\widehat{\beta\:}}_{OLS}=\:{\left({X}^{T}X\right)}^{-1}{X}^{T}y$$\end{document} Ridge Regression modifies this by introducing a penalty term, where λ ≥ 0 is the ridge regularization parameter and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:I$$\end{document} is the identity matrix:11\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\widehat{\beta\:}}_{ridge}=\:{\left({X}^{T}X+\lambda\:I\right)}^{-1}{X}^{T}y$$\end{document} This shrinks regression coefficients toward zero, producing more stable estimates and mitigating adverse effects of multicollinearity. Least absolute shrinkage and selection operator (Lasso) Lasso Regression, also referred to as L1 regularization, addresses overfitting by incorporating an L1 penalty into the loss function. This penalty encourages sparsity by forcing certain regression coefficients to become exactly zero, thereby enabling automatic feature selection. The Lasso loss function is defined as:12\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{Lasso}_{loss}=\:\sum\limits_{i=1}^{m}{\left({y}_{i}-{\hat y}_{i}\right)}^{2}+\:\lambda\:\: \sum\limits_{j=1}^{n}\left|{\beta\:}_{j}\right|$$\end{document} where, the first component, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\sum\nolimits_{i=1}^{m}{\left({y}_{i}-{\hat y}_{i}\right)}^{2}$$\end{document}, corresponds to the residual sum of squares, which quantifies the prediction error, while the second component, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\lambda\:\:{\sum\:}_{j=1}^{n}\left|{\beta\:}_{j}\right|$$\end{document}, represents the L1 penalty that promotes sparsity within the coefficient vector β. The parameter λ ≥ 0 acts as a regularization factor, governing the intensity of the penalty and thereby influencing the degree of shrinkage applied to the coefficients. Elastic net Elastic Net Regression combines the advantages of both Lasso (L1) and Ridge (L2) regularization, providing a balance between feature selection and multicollinearity reduction. This dual-penalty framework is particularly effective when predictor variables exhibit strong correlations. The Elastic Net optimization objective is defined as:13\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{ElasticNet}_{loss}=\sum\limits_{i=1}^{m}{\left({y}_{i}-{\hat y}_{i}\right)}^{2}+\:{\lambda\:}_{1}\:\sum\limits_{j=1}^{n}\left|{\beta\:}_{j}\right|+\:{\lambda\:}_{2}\:\sum\limits_{j=1}^{n}{\beta\:}_{j}^{2}\:\:$$\end{document} In this formulation, the first component corresponds to the residual sum of squares, which captures the prediction error. The second component represents the L1 penalty inherited from Lasso, promoting sparsity in the coefficient vector and effectively selecting the most relevant features. The third component introduces the L2 penalty from Ridge, which mitigates the effects of multicollinearity by stabilizing coefficient estimates. The parameters that are associated with these terms, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\lambda\:}_{1}\:$$\end{document}and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\lambda\:}_{2}$$\end{document}, regulate the relative influence of the L1 and L2 penalties, thereby controlling the balance between feature selection and model stability. Evaluation The proposed models were evaluated based on two primary criteria: predictive accuracy and computational efficiency, both of which are essential for practical deployment in real-time PV forecasting systems. Predictive performance was assessed using a comprehensive set of evaluation metrics, including MAE, RMSE, nMAE, nRMSE, R², WAPE, SMAPE, and skill score. Collectively, these metrics capture different aspects of forecasting performance, including accuracy, robustness, error distribution, and explanatory capability under varying operating conditions. In parallel, computational efficiency was evaluated by measuring the time required for hyperparameter tuning, model training, and testing at forecasting intervals of 5, 10, and 15 min. This analysis provides insight into the scalability and practical suitability of the models for large-scale or time-sensitive forecasting applications. The corresponding computational times are summarized in Table 5. Table 5Computational Times for Model Processes.ModelIntervalTuning Time (s)Training Time (s)Testing Time (s)XGBoost5 min231.0911.951.0210 min125.306.180.5015 min92.474.240.34Decision Tree5 min206.7814.770.0710 min100.407.410.0415 min66.984.900.03Linear Regression5 min0.520.630.0310 min0.230.240.0215 min0.130.140.01Ridge Regression5 min3.530.080.0210 min1.890.040.0115 min1.230.020.01Lasso Regression5 min10.412.000.0310 min4.920.950.0215 min3.350.530.01Elastic Net5 min24.232.070.0310 min12.980.790.0115 min7.250.380.01Times reflect the computational effort associated with hyperparameter tuning, training, and testing across the evaluated temporal resolutions. Linear Regression required minimal tuning because of its fixed configuration. Table 5Computational Times for Model Processes.ModelIntervalTuning Time (s)Training Time (s)Testing Time (s)XGBoost5 min231.0911.951.0210 min125.306.180.5015 min92.474.240.34Decision Tree5 min206.7814.770.0710 min100.407.410.0415 min66.984.900.03Linear Regression5 min0.520.630.0310 min0.230.240.0215 min0.130.140.01Ridge Regression5 min3.530.080.0210 min1.890.040.0115 min1.230.020.01Lasso Regression5 min10.412.000.0310 min4.920.950.0215 min3.350.530.01Elastic Net5 min24.232.070.0310 min12.980.790.0115 min7.250.380.01Times reflect the computational effort associated with hyperparameter tuning, training, and testing across the evaluated temporal resolutions. Linear Regression required minimal tuning because of its fixed configuration. Computational Times for Model Processes. Times reflect the computational effort associated with hyperparameter tuning, training, and testing across the evaluated temporal resolutions. Linear Regression required minimal tuning because of its fixed configuration. To improve robustness, a daytime filtering criterion was applied by selecting observations where Active_Power exceeded 10 kW, thereby ensuring that evaluation focused primarily on periods of substantial PV generation. Model validation employed a walk-forward strategy using 5-fold TimeSeriesSplit cross-validation to preserve chronological order while systematically assessing model stability across successive temporal segments. Additional stress-testing experiments were conducted under challenging operating conditions, including night-time periods characterized by Active_Power values at or below 10 kW and high-variability intervals identified using a rolling standard deviation (SD) exceeding the 75th percentile threshold. Performance evaluation was conducted across training, validation, testing, and seasonal subsets to examine forecasting behavior under diverse temporal and environmental conditions. The evaluation metrics are defined as follows: MSE: This metric calculates the average of the squared deviations between actual \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{(y}_{i})$$\end{document} and predicted values \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\left({\widehat{\mathrm{y}}}_{i}\right)$$\end{document}, giving greater weight to larger errors. A lower MSE indicates better accuracy, with an optimal score of zero representing a perfect fit. 14\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\mathrm{M}=\:\frac{1}{n}\sum\limits_{i=1}^{n}({y}_{i}-{\hat y }_{i}{)}^{2}$$\end{document} MSE: This metric calculates the average of the squared deviations between actual \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{(y}_{i})$$\end{document} and predicted values \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\left({\widehat{\mathrm{y}}}_{i}\right)$$\end{document}, giving greater weight to larger errors. A lower MSE indicates better accuracy, with an optimal score of zero representing a perfect fit. MSE: This metric calculates the average of the squared deviations between actual \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{(y}_{i})$$\end{document} and predicted values \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\left({\widehat{\mathrm{y}}}_{i}\right)$$\end{document}, giving greater weight to larger errors. A lower MSE indicates better accuracy, with an optimal score of zero representing a perfect fit. RMSE: Defined as the square root of the MSE, this metric expresses prediction error in the same units as the target variable. By construction, it places greater emphasis on larger deviations, making it particularly sensitive to significant errors. 15\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\mathrm{R}\mathrm{M}\mathrm{S}\mathrm{E}\:=\:\sqrt{\frac{1}{n}{\sum\:}_{i=1}^{n}{\left({y}_{i}-{\hat y }_{i}\right)}^{2}}$$\end{document} RMSE: Defined as the square root of the MSE, this metric expresses prediction error in the same units as the target variable. By construction, it places greater emphasis on larger deviations, making it particularly sensitive to significant errors. RMSE: Defined as the square root of the MSE, this metric expresses prediction error in the same units as the target variable. By construction, it places greater emphasis on larger deviations, making it particularly sensitive to significant errors. MAE: This metric represents the average of the absolute differences between predicted and actual values, providing a straightforward measure of forecasting accuracy. Its interpretability and scale dependence make it widely applicable across domains, as it expresses the typical magnitude of error in the same units as the target variable. 16\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:MAE=\frac{1}{n}\sum\:_{i=1}^{n}\left|{y}_{i}-{\widehat{y}}_{i}\right|$$\end{document} MAE: This metric represents the average of the absolute differences between predicted and actual values, providing a straightforward measure of forecasting accuracy. Its interpretability and scale dependence make it widely applicable across domains, as it expresses the typical magnitude of error in the same units as the target variable. MAE: This metric represents the average of the absolute differences between predicted and actual values, providing a straightforward measure of forecasting accuracy. Its interpretability and scale dependence make it widely applicable across domains, as it expresses the typical magnitude of error in the same units as the target variable. R²: This metric quantifies the proportion of variance in the dependent variable that is accounted for by the model. Its value ranges between 0, indicating no explanatory power, and 1, representing a perfect fit. 17\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{R}^{2}=1-\frac{\sum\:_{i=1}^{n}{\left({y}_{i}-{\widehat{y}}_{i}\right)}^{2}}{\sum\:_{i=1}^{n}{\left({y}_{i}-\stackrel{-}{{y}_{i}}\right)}^{2}}\:\:$$\end{document} R²: This metric quantifies the proportion of variance in the dependent variable that is accounted for by the model. Its value ranges between 0, indicating no explanatory power, and 1, representing a perfect fit. R²: This metric quantifies the proportion of variance in the dependent variable that is accounted for by the model. Its value ranges between 0, indicating no explanatory power, and 1, representing a perfect fit. where, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\stackrel{-}{{y}_{i}}$$\end{document} is the mean of observed values. where, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\stackrel{-}{{y}_{i}}$$\end{document} is the mean of observed values. nMAE and nRMSE: These represent scaled versions of MAE and RMSE, respectively, where the errors are adjusted relative to a reference value such as the mean or the range of the target variable. Normalization provides a dimensionless measure of error, enabling comparability across datasets with different scales. The exact definition depends on the chosen normalization criterion, e.g., 18\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\mathrm{n}\mathrm{M}\mathrm{A}\mathrm{E}=\frac{\mathrm{M}\mathrm{A}\mathrm{E}}{\stackrel{-}{{y}_{i}}}.$$\end{document} nMAE and nRMSE: These represent scaled versions of MAE and RMSE, respectively, where the errors are adjusted relative to a reference value such as the mean or the range of the target variable. Normalization provides a dimensionless measure of error, enabling comparability across datasets with different scales. The exact definition depends on the chosen normalization criterion, e.g., nMAE and nRMSE: These represent scaled versions of MAE and RMSE, respectively, where the errors are adjusted relative to a reference value such as the mean or the range of the target variable. Normalization provides a dimensionless measure of error, enabling comparability across datasets with different scales. The exact definition depends on the chosen normalization criterion, e.g., WAPE: This metric evaluates forecasting accuracy by weighing absolute percentage errors according to the magnitude of the actual values. It is particularly useful for datasets with imbalanced distributions, as it reduces bias introduced by small target values. 19\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:WAPE=\frac{\sum\:_{i=1}^{n}\left|{y}_{i}-{\widehat{y}}_{i}\right|}{\sum\:_{i=1}^{n}\left|{y}_{i}\right|}\:\:$$\end{document} WAPE: This metric evaluates forecasting accuracy by weighing absolute percentage errors according to the magnitude of the actual values. It is particularly useful for datasets with imbalanced distributions, as it reduces bias introduced by small target values. WAPE: This metric evaluates forecasting accuracy by weighing absolute percentage errors according to the magnitude of the actual values. It is particularly useful for datasets with imbalanced distributions, as it reduces bias introduced by small target values. SMAPE: This metric is a modified form of MAPE that treats overestimation and underestimation more evenly, thereby reducing bias in percentage-based error evaluation. 20\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:SMAPE=\frac{100\%}{n}\sum\:_{i=1}^{n}\frac{\left|{y}_{i}-{\widehat{y}}_{i}\right|}{(\left|{y}_{i}\right|+\:\left|{\widehat{y}}_{i}\right|)/2}$$\end{document} SMAPE: This metric is a modified form of MAPE that treats overestimation and underestimation more evenly, thereby reducing bias in percentage-based error evaluation. SMAPE: This metric is a modified form of MAPE that treats overestimation and underestimation more evenly, thereby reducing bias in percentage-based error evaluation. Skill Score: This indicator evaluates the relative improvement of a model compared to a predefined baseline (such as a persistence forecast), calculated as Skill Score = \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:1-\frac{{RMSE}_{model}}{{RMSE}_{baseline}}\:$$\end{document}. A positive score signifies superior performance over the reference method. The formula follows the standard definition widely used in solar forecasting literature47. The persistence baseline was chosen as a fixed lag of 288-time steps, which corresponds to 1 day at 5 min, 2 days at 10 min, and 3 days at 15 min resolution. This baseline is deliberately weak, it does not account for diurnal patterns or weather changes – ensuring that high skill scores (e.g., 97–98%) reflect genuine predictive ability rather than an overly easy benchmark. Skill Score: This indicator evaluates the relative improvement of a model compared to a predefined baseline (such as a persistence forecast), calculated as Skill Score = \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:1-\frac{{RMSE}_{model}}{{RMSE}_{baseline}}\:$$\end{document}. A positive score signifies superior performance over the reference method. The formula follows the standard definition widely used in solar forecasting literature47. The persistence baseline was chosen as a fixed lag of 288-time steps, which corresponds to 1 day at 5 min, 2 days at 10 min, and 3 days at 15 min resolution. This baseline is deliberately weak, it does not account for diurnal patterns or weather changes – ensuring that high skill scores (e.g., 97–98%) reflect genuine predictive ability rather than an overly easy benchmark. Skill Score: This indicator evaluates the relative improvement of a model compared to a predefined baseline (such as a persistence forecast), calculated as Skill Score = \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:1-\frac{{RMSE}_{model}}{{RMSE}_{baseline}}\:$$\end{document}. A positive score signifies superior performance over the reference method. The formula follows the standard definition widely used in solar forecasting literature47. The persistence baseline was chosen as a fixed lag of 288-time steps, which corresponds to 1 day at 5 min, 2 days at 10 min, and 3 days at 15 min resolution. This baseline is deliberately weak, it does not account for diurnal patterns or weather changes – ensuring that high skill scores (e.g., 97–98%) reflect genuine predictive ability rather than an overly easy benchmark. Together, these performance metrics, when integrated with the described validation procedures and stress-testing strategies, establish a comprehensive and robust framework for assessing model effectiveness under a wide range of PV forecasting conditions. Results and discussion This section presents a comprehensive evaluation of the proposed forecasting models, XGBoost, Decision Tree, Linear Regression, Ridge Regression, Lasso Regression, and Elastic Net, against a persistence baseline for short-term PV prediction at 5-minute, 10-minute, and 15-minute horizons. The evaluation covers training, validation, testing, and seasonal subsets (Spring, Summer, Autumn, Winter), and incorporates walk-forward validation for temporal stability, stress testing for robustness under night-time and high-variability conditions, and computational efficiency analysis. Performance is assessed using multiple metrics, including MAE, RMSE, nMAE, nRMSE, R², WAPE, SMAPE (restricted to daytime conditions where Active_Power > 10 kW), and Skill Score (percentage RMSE improvement over persistence). Visual tools such as time-series plots and scatter plots are used to support interpretation. Overall, the discussion focuses on performance trends across forecasting horizons and seasons, highlights the superiority of tree-based models, evaluates computational trade-offs, and discusses limitations relevant to real-world grid integration. Among the evaluation metrics, SMAPE and WAPE provide complementary perspectives beyond MAE and RMSE. While MAE and RMSE quantify absolute errors in kilowatts and are scale-dependent, SMAPE provides a scale-independent percentage error that treats over- and under-predictions symmetrically. This makes it particularly suitable for comparing performance across different PV systems and seasonal conditions. In contrast, WAPE weights absolute errors by actual power magnitude, reducing distortion from low-generation periods such as nighttime or cloudy conditions. As shown in Tables 6, 7, 8 and 9, tree-based models consistently achieve lower SMAPE (approximately 0.6–1.4%) and WAPE (approximately 0.6–0.8%) compared to linear models, which reach SMAPE values up to 5.5% and WAPE up to 3.8%. These results confirm that tree-based approaches maintain high relative accuracy across varying operating conditions. Results at 5-minute horizon The analysis of Figs. 5 and 6 underscores the dominance of tree-based models, with Decision Tree and XGBoost excelling in capturing rapid PV power fluctuations over a 3-day horizon. Decision Tree’s MAE of 0.3583 kW and XGBoost’s R² of 0.9997 (Table 6) highlight their prowess in modeling nonlinear dynamics, critical for grid reliability under dynamic solar conditions. Linear models (e.g., Linear Regression’s RMSE of 3.7901 kW) and persistence (RMSE = 33.5494 kW) lag significantly, revealing their limitations in handling short-term variability. Linear models performed significantly worse than tree-based methods due to the inherently non-linear relationship between PV power and weather variables, the presence of complex feature interactions, and the abrupt regime shifts (e.g., cloud cover) that characterise solar generation. Linear models with lag features can capture smooth trends but fail to model the threshold-like behaviour needed for high-variability and stress conditions, as evidenced by their high RMSE. These results underscore that linear regressors are unsuitable for sub-hourly PV forecasting under dynamic weather. The robustness of tree-based models (Decision Tree and XGBoost) stems from three key factors. First, the autoregressive features (Active_Power_lag_1, lag_12, lag_288) encode historical dependencies that tree-based models exploit through threshold-based splits, allowing them to capture abrupt changes (e.g., cloud cover) that linear models smooth out. Second, meteorological variables (e.g., Pyranometer_1, Wind_Speed, Temperature_Probe_1) interact non-linearly with PV output – for example, a combined effect of high irradiance and moderate temperature on module efficiency. Tree models naturally partition such interactions without requiring manually engineered cross-terms. Third, the regression algorithm itself – recursive binary partitioning – enables decision trees to approximate step-wise, non-monotonic functions, which is essential for handling rapid regime shifts (sunrise/sunset, passing clouds). In contrast, linear regressors assume a constant rate of change, leading to large errors during stress conditions. Scatter plots across all horizons (Figs. 6, 8, 10) consistently show tree-based predictions clustering tightly around actual values, while linear approaches exhibit greater dispersion, a pattern reinforced here at 5 min. The high skill scores (96–98%) reflect the combination of a weak persistence baseline (RMSE ≈ 45 kW) and the excellent predictive ability of tree-based models, which capture the strong daily pattern of PV generation. Similar skill levels have been reported in other high-resolution forecasting studies48,49. Fig. 5Combined Prediction vs. Actual (3 Days) – 5-minute Interval. Combined Prediction vs. Actual (3 Days) – 5-minute Interval. Fig. 6All Models Actual vs. Predicted – 5-minute Interval. All Models Actual vs. Predicted – 5-minute Interval. Table 65-min - Comprehensive Model Performance Metrics Across Datasets and Seasons.ModelDataset/SeasonMAERMSEnMAEnRMSER²WAPE (%)Daytime SMAPE (%)Skill vs. Persistence (%)XGBoostTraining0.72141.61690.01260.00600.99971.25571.183195.1806Validation0.88612.49120.01240.00920.99931.23741.341195.2817Testing0.85771.79760.01280.00660.99961.27771.405896.0091Spring0.74421.37700.01240.00510.99981.23401.215996.0468Summer0.68581.29570.01220.00480.99981.22091.121096.2709Autumn0.82962.40770.01350.00890.99931.34561.327994.8567Winter0.82162.00170.01230.00740.99951.22851.335594.8963Decision TreeTraining0.35831.32670.00620.00490.99980.62370.644396.0455Validation0.63263.49840.00880.01290.99850.88330.978193.3740Testing0.55141.80350.00820.00670.99960.82130.927995.9960Spring0.39641.21430.00660.00450.99980.65730.717396.5140Summer0.33481.01230.00600.00370.99990.59600.651197.0865Autumn0.50563.05240.00820.01130.99890.82020.819193.4796Winter0.49711.76740.00740.00650.99960.74320.830995.4937Linear RegressionTraining1.18123.79010.02060.01400.99822.05611.916988.7031Validation1.27774.88950.01790.01800.99721.78421.722990.7393Testing1.09103.89980.01630.01440.99811.62511.987391.3422Spring0.99292.51880.01650.00930.99921.64631.789792.7689Summer0.96142.31710.01710.00850.99931.71141.609293.3311Autumn1.47525.48890.02390.02020.99642.39292.174888.2747Winter1.34504.92730.02010.01820.99722.01102.004787.4366Ridge RegressionTraining1.17053.79100.02040.01400.99822.03741.876888.7003Validation1.26024.89340.01760.01800.99721.75961.672290.7320Testing1.07183.88860.01600.01430.99811.59651.938591.3671Spring0.98042.49750.01630.00920.99921.62571.747292.8300Summer0.95602.30700.01700.00850.99931.70191.580493.3601Autumn1.45935.50220.02370.02030.99642.36702.125388.2463Winter1.32574.92890.01980.01820.99721.98221.952387.4327Lasso RegressionTraining1.18533.80550.02070.01400.99822.06311.883288.6571Validation1.29764.88120.01810.01800.99721.81191.700290.7550Testing0.99973.84880.01490.01420.99821.48911.723991.4555Spring0.96582.51380.01600.00930.99921.60141.691992.7831Summer0.95062.33360.01690.00860.99931.69231.552593.2834Autumn1.47515.48700.02390.02020.99642.39262.111988.2787Winter1.35314.92710.02020.01820.99722.02311.939287.4371Elastic NetTraining1.18533.80550.02070.01400.99822.06311.883288.6571Validation1.29764.88120.01810.01800.99721.81191.700290.7550Testing0.99973.84880.01490.01420.99821.48911.723991.4555Spring0.96582.51380.01600.00930.99921.60141.691992.7831Summer0.95062.33360.01690.00860.99931.69231.552593.2834Autumn1.47515.48700.02390.02020.99642.39262.111988.2787Winter1.35314.92710.02020.01820.99722.02311.939287.4371PersistenceTraining11.389633.54940.19850.12370.857619.829027.2787-Validation21.581352.79870.30130.19470.668930.110436.5494-Testing17.158845.04360.25590.16620.748925.568332.7375-Spring12.383934.83260.20560.12850.840120.543128.2416-Summer10.442934.74420.18610.12810.839418.584824.6252-Autumn18.276346.81250.29670.17260.741329.645037.8099-Winter14.767539.21970.22100.14460.821822.084929.3828- Table 65-min - Comprehensive Model Performance Metrics Across Datasets and Seasons.ModelDataset/SeasonMAERMSEnMAEnRMSER²WAPE (%)Daytime SMAPE (%)Skill vs. Persistence (%)XGBoostTraining0.72141.61690.01260.00600.99971.25571.183195.1806Validation0.88612.49120.01240.00920.99931.23741.341195.2817Testing0.85771.79760.01280.00660.99961.27771.405896.0091Spring0.74421.37700.01240.00510.99981.23401.215996.0468Summer0.68581.29570.01220.00480.99981.22091.121096.2709Autumn0.82962.40770.01350.00890.99931.34561.327994.8567Winter0.82162.00170.01230.00740.99951.22851.335594.8963Decision TreeTraining0.35831.32670.00620.00490.99980.62370.644396.0455Validation0.63263.49840.00880.01290.99850.88330.978193.3740Testing0.55141.80350.00820.00670.99960.82130.927995.9960Spring0.39641.21430.00660.00450.99980.65730.717396.5140Summer0.33481.01230.00600.00370.99990.59600.651197.0865Autumn0.50563.05240.00820.01130.99890.82020.819193.4796Winter0.49711.76740.00740.00650.99960.74320.830995.4937Linear RegressionTraining1.18123.79010.02060.01400.99822.05611.916988.7031Validation1.27774.88950.01790.01800.99721.78421.722990.7393Testing1.09103.89980.01630.01440.99811.62511.987391.3422Spring0.99292.51880.01650.00930.99921.64631.789792.7689Summer0.96142.31710.01710.00850.99931.71141.609293.3311Autumn1.47525.48890.02390.02020.99642.39292.174888.2747Winter1.34504.92730.02010.01820.99722.01102.004787.4366Ridge RegressionTraining1.17053.79100.02040.01400.99822.03741.876888.7003Validation1.26024.89340.01760.01800.99721.75961.672290.7320Testing1.07183.88860.01600.01430.99811.59651.938591.3671Spring0.98042.49750.01630.00920.99921.62571.747292.8300Summer0.95602.30700.01700.00850.99931.70191.580493.3601Autumn1.45935.50220.02370.02030.99642.36702.125388.2463Winter1.32574.92890.01980.01820.99721.98221.952387.4327Lasso RegressionTraining1.18533.80550.02070.01400.99822.06311.883288.6571Validation1.29764.88120.01810.01800.99721.81191.700290.7550Testing0.99973.84880.01490.01420.99821.48911.723991.4555Spring0.96582.51380.01600.00930.99921.60141.691992.7831Summer0.95062.33360.01690.00860.99931.69231.552593.2834Autumn1.47515.48700.02390.02020.99642.39262.111988.2787Winter1.35314.92710.02020.01820.99722.02311.939287.4371Elastic NetTraining1.18533.80550.02070.01400.99822.06311.883288.6571Validation1.29764.88120.01810.01800.99721.81191.700290.7550Testing0.99973.84880.01490.01420.99821.48911.723991.4555Spring0.96582.51380.01600.00930.99921.60141.691992.7831Summer0.95062.33360.01690.00860.99931.69231.552593.2834Autumn1.47515.48700.02390.02020.99642.39262.111988.2787Winter1.35314.92710.02020.01820.99722.02311.939287.4371PersistenceTraining11.389633.54940.19850.12370.857619.829027.2787-Validation21.581352.79870.30130.19470.668930.110436.5494-Testing17.158845.04360.25590.16620.748925.568332.7375-Spring12.383934.83260.20560.12850.840120.543128.2416-Summer10.442934.74420.18610.12810.839418.584824.6252-Autumn18.276346.81250.29670.17260.741329.645037.8099-Winter14.767539.21970.22100.14460.821822.084929.3828- 5-min - Comprehensive Model Performance Metrics Across Datasets and Seasons. Results at 10-minute horizon At the 10-minute horizon (Figs. 7 and 8), tree-based models maintain superior performance as temporal aggregation reduces short-term variability. Decision Tree achieves a MAE of 0.3423 kW, while XGBoost reaches an R² of 0.9999 (Table 7), indicating highly stable predictive performance. Although the performance gap between tree-based and linear models slightly narrows due to smoothing effects at longer intervals, tree-based methods remain consistently superior. The persistence model (RMSE = 36.3667 kW) continues to serve as a weak baseline. Fig. 7Combined Prediction vs. Actual (3 Days) – 10-minute Interval. Combined Prediction vs. Actual (3 Days) – 10-minute Interval. Fig. 8All Models Actual vs. Predicted – 10-minute Interval. All Models Actual vs. Predicted – 10-minute Interval. Table 710-min - Comprehensive Model Performance Metrics Across Datasets and Seasons.ModelDataset/SeasonMAERMSEnMAEnRMSER²WAPE (%)Daytime SMAPE (%)Skill vs. Persistence (%)XGBoostTraining0.71041.47280.01240.00540.99971.23451.159195.9502Validation0.87151.79630.01210.00660.99961.21271.312496.9307Testing0.86411.74790.01290.00640.99961.28611.344796.5907Spring0.73291.17340.01220.00430.99981.21501.202596.9568Summer0.67831.19920.01210.00440.99981.20621.097296.8929Autumn0.81261.88780.01310.00690.99961.31271.290996.3399Winter0.82191.93220.01230.00710.99961.22651.283295.4768Decision TreeTraining0.34231.08440.00600.00400.99990.59490.615897.0182Validation0.52221.45450.00730.00530.99970.72660.871097.5146Testing0.53321.44660.00790.00530.99970.79370.903697.1784Spring0.38320.86490.00640.00320.99990.63530.699097.7568Summer0.33020.85710.00590.00310.99990.58720.635997.7794Autumn0.40391.34210.00650.00490.99980.65260.697197.3979Winter0.48801.65000.00730.00600.99970.72830.810596.1374Linear RegressionTraining1.03392.96140.01800.01080.99891.79681.598391.8569Validation1.01273.01600.01410.01100.99891.40921.270094.8465Testing0.85442.99900.01270.01100.99891.27161.637894.1505Spring0.88291.92920.01470.00710.99951.46371.530794.9965Summer0.91001.99880.01620.00730.99951.61831.427794.8211Autumn1.16403.88210.01880.01420.99821.88051.651292.4731Winter1.08023.70970.01610.01360.99841.61191.569291.3157Ridge RegressionTraining1.03242.96240.01800.01080.99891.79401.604691.8540Validation1.00843.01750.01400.01110.99891.40311.269294.8439Testing0.88123.02520.01310.01110.99891.31151.700594.0994Spring0.89181.94630.01480.00710.99951.47841.568594.9524Summer0.91272.00540.01620.00730.99951.62321.448994.8041Autumn1.16193.88270.01880.01420.99821.87711.648792.4719Winter1.07913.71230.01610.01360.99841.61021.569491.3098Lasso RegressionTraining1.04232.97700.01810.01090.99891.81131.585591.8140Validation1.03383.01720.01440.01110.99891.43851.261494.8444Testing0.77282.94040.01150.01080.99891.15021.397994.2647Spring0.84961.92030.01410.00700.99951.40841.432195.0197Summer0.89372.01570.01590.00740.99951.58931.379094.7773Autumn1.17483.88320.01900.01420.99821.89801.617592.4709Winter1.11023.71060.01660.01360.99841.65671.548391.3136Elastic NetTraining1.04232.97700.01810.01090.99891.81131.585591.8140Validation1.03383.01720.01440.01110.99891.43851.261494.8444Testing0.77282.94040.01150.01080.99891.15021.397994.2647Spring0.84961.92030.01410.00700.99951.40841.432195.0197Summer0.89372.01570.01590.00740.99951.58931.379094.7773Autumn1.17483.88320.01900.01420.99821.89801.617592.4709Winter1.11023.71060.01660.01360.99841.65671.548391.3136PersistenceTraining12.955236.36670.22540.13320.832722.521430.1299-Validation25.288958.52360.35220.21440.593335.195141.6818-Testing20.978351.26860.31270.18780.673831.243738.8299-Spring14.399538.55800.23910.14120.803923.889131.4474-Summer12.566438.59570.22390.14140.801522.364628.7795-Autumn20.839651.57610.33700.18890.687333.667841.6023-Winter17.034942.71770.25450.15640.788225.431333.5962- Table 710-min - Comprehensive Model Performance Metrics Across Datasets and Seasons.ModelDataset/SeasonMAERMSEnMAEnRMSER²WAPE (%)Daytime SMAPE (%)Skill vs. Persistence (%)XGBoostTraining0.71041.47280.01240.00540.99971.23451.159195.9502Validation0.87151.79630.01210.00660.99961.21271.312496.9307Testing0.86411.74790.01290.00640.99961.28611.344796.5907Spring0.73291.17340.01220.00430.99981.21501.202596.9568Summer0.67831.19920.01210.00440.99981.20621.097296.8929Autumn0.81261.88780.01310.00690.99961.31271.290996.3399Winter0.82191.93220.01230.00710.99961.22651.283295.4768Decision TreeTraining0.34231.08440.00600.00400.99990.59490.615897.0182Validation0.52221.45450.00730.00530.99970.72660.871097.5146Testing0.53321.44660.00790.00530.99970.79370.903697.1784Spring0.38320.86490.00640.00320.99990.63530.699097.7568Summer0.33020.85710.00590.00310.99990.58720.635997.7794Autumn0.40391.34210.00650.00490.99980.65260.697197.3979Winter0.48801.65000.00730.00600.99970.72830.810596.1374Linear RegressionTraining1.03392.96140.01800.01080.99891.79681.598391.8569Validation1.01273.01600.01410.01100.99891.40921.270094.8465Testing0.85442.99900.01270.01100.99891.27161.637894.1505Spring0.88291.92920.01470.00710.99951.46371.530794.9965Summer0.91001.99880.01620.00730.99951.61831.427794.8211Autumn1.16403.88210.01880.01420.99821.88051.651292.4731Winter1.08023.70970.01610.01360.99841.61191.569291.3157Ridge RegressionTraining1.03242.96240.01800.01080.99891.79401.604691.8540Validation1.00843.01750.01400.01110.99891.40311.269294.8439Testing0.88123.02520.01310.01110.99891.31151.700594.0994Spring0.89181.94630.01480.00710.99951.47841.568594.9524Summer0.91272.00540.01620.00730.99951.62321.448994.8041Autumn1.16193.88270.01880.01420.99821.87711.648792.4719Winter1.07913.71230.01610.01360.99841.61021.569491.3098Lasso RegressionTraining1.04232.97700.01810.01090.99891.81131.585591.8140Validation1.03383.01720.01440.01110.99891.43851.261494.8444Testing0.77282.94040.01150.01080.99891.15021.397994.2647Spring0.84961.92030.01410.00700.99951.40841.432195.0197Summer0.89372.01570.01590.00740.99951.58931.379094.7773Autumn1.17483.88320.01900.01420.99821.89801.617592.4709Winter1.11023.71060.01660.01360.99841.65671.548391.3136Elastic NetTraining1.04232.97700.01810.01090.99891.81131.585591.8140Validation1.03383.01720.01440.01110.99891.43851.261494.8444Testing0.77282.94040.01150.01080.99891.15021.397994.2647Spring0.84961.92030.01410.00700.99951.40841.432195.0197Summer0.89372.01570.01590.00740.99951.58931.379094.7773Autumn1.17483.88320.01900.01420.99821.89801.617592.4709Winter1.11023.71060.01660.01360.99841.65671.548391.3136PersistenceTraining12.955236.36670.22540.13320.832722.521430.1299-Validation25.288958.52360.35220.21440.593335.195141.6818-Testing20.978351.26860.31270.18780.673831.243738.8299-Spring14.399538.55800.23910.14120.803923.889131.4474-Summer12.566438.59570.22390.14140.801522.364628.7795-Autumn20.839651.57610.33700.18890.687333.667841.6023-Winter17.034942.71770.25450.15640.788225.431333.5962- 10-min - Comprehensive Model Performance Metrics Across Datasets and Seasons. Results at 15-minute horizon On the 15-minute horizon (Figs. 9 and 10), tree-based models continue to dominate. Decision Tree achieves a MAE of 0.3313 kW and a Skill Score of 97.8881% in summer, while XGBoost maintains an R² of 0.9999 (Table 8). Although temporal smoothing reduces variability, tree-based models consistently outperform linear models (e.g., Linear Regression RMSE = 2.4811 kW) and persistence (RMSE = 37.4153 kW), which exhibits the poorest performance. These results confirm that tree-based methods remain robust even under reduced temporal resolution, making them suitable for operational forecasting applications. Fig. 9Combined Prediction vs. Actual (3 Days) – 15-minute Interval. Combined Prediction vs. Actual (3 Days) – 15-minute Interval. Fig. 10All Models Actual vs. Predicted – 15-minute Interval. All Models Actual vs. Predicted – 15-minute Interval. Table 815-min - Comprehensive Model Performance Metrics Across Datasets and Seasons.ModelDataset/SeasonMAERMSEnMAEnRMSER²WAPE (%)Daytime SMAPE (%)Skill vs. Persistence (%)XGBoostTraining0.70101.40430.01220.00510.99981.21731.145596.2468Validation0.81631.64380.01130.00600.99971.13411.310397.1726Testing0.80241.61210.01200.00590.99971.19411.283696.9137Spring0.71681.16530.01190.00420.99981.18891.178797.0920Summer0.66341.08510.01180.00400.99981.17961.079897.2187Autumn0.77761.82520.01250.00660.99961.25391.269896.4428Winter0.78761.74760.01170.00640.99961.17381.265996.0295Decision TreeTraining0.33131.03310.00580.00380.99990.57540.597597.2388Validation0.53991.44180.00750.00530.99980.75010.893097.5200Testing0.54291.41840.00810.00520.99970.80800.914097.2845Spring0.37970.85100.00630.00310.99990.62970.687597.8764Summer0.33490.82390.00600.00300.99990.59550.640297.8881Autumn0.40171.31740.00650.00480.99980.64780.695297.4326Winter0.47461.57490.00710.00570.99970.70720.797496.4218Linear RegressionTraining0.96992.48110.01690.00900.99921.68441.472393.3686Validation0.94452.34520.01310.00850.99931.31221.122495.9661Testing0.74682.30010.01110.00840.99931.11141.513795.5966Spring0.84241.67990.01400.00610.99961.39711.432395.8080Summer0.89041.78250.01590.00650.99961.58341.391395.4310Autumn1.04113.11100.01680.01130.99891.67891.450893.9370Winter0.96912.94550.01450.01070.99901.44421.386793.3079Ridge RegressionTraining0.96772.48140.01680.00900.99921.68061.461493.3679Validation0.93682.34160.01300.00850.99931.30151.104295.9724Testing0.75242.30900.01120.00840.99931.11961.517195.5794Spring0.84371.68420.01400.00610.99961.39941.429095.7972Summer0.89131.78540.01590.00650.99961.58501.387895.4237Autumn1.03553.10990.01670.01130.99891.66991.432393.9391Winter0.96432.94530.01440.01070.99901.43701.372493.3083Lasso RegressionTraining0.98152.49940.01710.00910.99921.70461.468393.3199Validation0.96072.34570.01340.00850.99931.33461.112995.9653Testing0.66482.22000.00990.00810.99940.98931.263995.7499Spring0.80971.67150.01340.00610.99961.34301.329995.8289Summer0.87291.79930.01550.00660.99961.55221.322295.3879Autumn1.05363.10950.01700.01130.99891.69911.434793.9400Winter1.00402.94690.01500.01070.99901.49631.386793.3045Elastic NetTraining0.98152.49940.01710.00910.99921.70461.468393.3199Validation0.96072.34570.01340.00850.99931.33461.112995.9653Testing0.66482.22000.00990.00810.99940.98931.263995.7499Spring0.80971.67150.01340.00610.99961.34301.329995.8289Summer0.87291.79930.01550.00660.99961.55221.322295.3879Autumn1.05363.10950.01700.01130.99891.69911.434793.9400Winter1.00402.94690.01500.01070.99901.49631.386793.3045PersistenceTraining13.539337.41530.23550.13620.822823.522131.1036-Validation25.568258.13830.35490.21170.599335.460642.2615-Testing21.783452.23410.32490.19030.660032.461440.1386-Spring15.191140.07420.25240.14590.787725.215132.5199-Summer12.942739.01290.23030.14200.797123.007129.3189-Autumn21.127651.31140.34100.18680.690834.070742.3788-Winter17.812844.01370.26590.16020.774926.569434.9198- Table 815-min - Comprehensive Model Performance Metrics Across Datasets and Seasons.ModelDataset/SeasonMAERMSEnMAEnRMSER²WAPE (%)Daytime SMAPE (%)Skill vs. Persistence (%)XGBoostTraining0.70101.40430.01220.00510.99981.21731.145596.2468Validation0.81631.64380.01130.00600.99971.13411.310397.1726Testing0.80241.61210.01200.00590.99971.19411.283696.9137Spring0.71681.16530.01190.00420.99981.18891.178797.0920Summer0.66341.08510.01180.00400.99981.17961.079897.2187Autumn0.77761.82520.01250.00660.99961.25391.269896.4428Winter0.78761.74760.01170.00640.99961.17381.265996.0295Decision TreeTraining0.33131.03310.00580.00380.99990.57540.597597.2388Validation0.53991.44180.00750.00530.99980.75010.893097.5200Testing0.54291.41840.00810.00520.99970.80800.914097.2845Spring0.37970.85100.00630.00310.99990.62970.687597.8764Summer0.33490.82390.00600.00300.99990.59550.640297.8881Autumn0.40171.31740.00650.00480.99980.64780.695297.4326Winter0.47461.57490.00710.00570.99970.70720.797496.4218Linear RegressionTraining0.96992.48110.01690.00900.99921.68441.472393.3686Validation0.94452.34520.01310.00850.99931.31221.122495.9661Testing0.74682.30010.01110.00840.99931.11141.513795.5966Spring0.84241.67990.01400.00610.99961.39711.432395.8080Summer0.89041.78250.01590.00650.99961.58341.391395.4310Autumn1.04113.11100.01680.01130.99891.67891.450893.9370Winter0.96912.94550.01450.01070.99901.44421.386793.3079Ridge RegressionTraining0.96772.48140.01680.00900.99921.68061.461493.3679Validation0.93682.34160.01300.00850.99931.30151.104295.9724Testing0.75242.30900.01120.00840.99931.11961.517195.5794Spring0.84371.68420.01400.00610.99961.39941.429095.7972Summer0.89131.78540.01590.00650.99961.58501.387895.4237Autumn1.03553.10990.01670.01130.99891.66991.432393.9391Winter0.96432.94530.01440.01070.99901.43701.372493.3083Lasso RegressionTraining0.98152.49940.01710.00910.99921.70461.468393.3199Validation0.96072.34570.01340.00850.99931.33461.112995.9653Testing0.66482.22000.00990.00810.99940.98931.263995.7499Spring0.80971.67150.01340.00610.99961.34301.329995.8289Summer0.87291.79930.01550.00660.99961.55221.322295.3879Autumn1.05363.10950.01700.01130.99891.69911.434793.9400Winter1.00402.94690.01500.01070.99901.49631.386793.3045Elastic NetTraining0.98152.49940.01710.00910.99921.70461.468393.3199Validation0.96072.34570.01340.00850.99931.33461.112995.9653Testing0.66482.22000.00990.00810.99940.98931.263995.7499Spring0.80971.67150.01340.00610.99961.34301.329995.8289Summer0.87291.79930.01550.00660.99961.55221.322295.3879Autumn1.05363.10950.01700.01130.99891.69911.434793.9400Winter1.00402.94690.01500.01070.99901.49631.386793.3045PersistenceTraining13.539337.41530.23550.13620.822823.522131.1036-Validation25.568258.13830.35490.21170.599335.460642.2615-Testing21.783452.23410.32490.19030.660032.461440.1386-Spring15.191140.07420.25240.14590.787725.215132.5199-Summer12.942739.01290.23030.14200.797123.007129.3189-Autumn21.127651.31140.34100.18680.690834.070742.3788-Winter17.812844.01370.26590.16020.774926.569434.9198- 15-min - Comprehensive Model Performance Metrics Across Datasets and Seasons. Seasonal variation analysis Seasonal evaluation across spring, summer, autumn, and winter reveals the influence of climatic variability on forecasting performance. Decision Tree performs best under stable summer conditions (MAE = 0.3349 kW, R² = 0.9999 at 15 min), while XGBoost demonstrates strong consistency across all seasons (R² ≈ 0.9996 in autumn). Linear models perform poorly during highly variable seasons such as autumn and winter (e.g., Linear Regression RMSE = 5.4889 kW at 5 min). Persistence remains the weakest baseline across all seasonal conditions (WAPE up to 29.65%). These results (Figs. 11, 12 and 13) confirm that nonlinear and adaptive models are essential for handling seasonal variability in PV forecasting. Fig. 11Seasonal Actual vs. Predicted – 5-min (All 6 Models, All Seasons). Seasonal Actual vs. Predicted – 5-min (All 6 Models, All Seasons). Fig. 12Seasonal Actual vs. Predicted – 10-min (All 6 Models, All Seasons). Seasonal Actual vs. Predicted – 10-min (All 6 Models, All Seasons). Fig. 13Seasonal Actual vs. Predicted – 15-min (All 6 Models, All Seasons). Seasonal Actual vs. Predicted – 15-min (All 6 Models, All Seasons). Stress test performance metrics The Stress Test Performance Metrics are designed to assess the robustness and reliability of PV forecasting models when exposed to challenging conditions that fall outside typical operational scenarios. These tests specifically evaluate model performance during night-time intervals, defined as periods with Active_Power ≤ 10 kW when PV generation is negligible, and during high-variability intervals, identified by a rolling SD greater than the 75th percentile, which captures rapid fluctuations in power output often caused by weather dynamics or other transient factors. Table 9 summarizes the evaluation results across all forecasting intervals, reporting performance indicators such as MAE, RMSE, nMAE, nRMSE, R2, and WAPE. These metrics were computed by applying targeted masks to the test dataset and then quantifying the discrepancies between predicted and actual Active_Power values. MAE and RMSE capture the magnitude of forecasting errors in absolute and squared terms, while their normalized counterparts (nMAE, nRMSE) provide scale-independent insight relative to mean power values. The coefficient of determination (R2) reflects the proportion of variance explained by the models, and WAPE (%) quantifies percentage errors weighted by the magnitude of observed values. Furthermore, the results reveal that Decision Tree regression demonstrates superior performance in night-time scenarios (e.g., MAE = 0.1204 at the 5-minute horizon), suggesting greater resilience under low-power conditions. Conversely, XGBoost outperforms other models under high-variability scenarios (e.g.,R2 = 0.9979 at 5-minute intervals) due to its enhanced capacity to capture nonlinear dependencies and complex fluctuations. By contrast, larger error values observed for Linear Regression in high-variability contexts (e.g., MAE = 2.5058 and RMSE = 7.4835) underscore the difficulty of modeling rapid transients using simpler linear formulations, highlighting the importance of model-specific optimizations in such settings. Table 9Stress Test Performance Metrics.ModelScenarioIntervalMAERMSEnMAEnRMSER²WAPE (%)XGBoostNight-Time5 min0.42410.55091.57860.05470.8374113.580310 min0.42870.56981.59740.05660.8242114.990615 min0.41370.53251.46710.05290.8546107.1648High Variability5 min1.39013.12720.01180.01150.99791.179810 min1.32742.79860.01140.01030.99861.141115 min1.18972.30090.01040.00840.99921.0401Decision TreeNight-Time5 min0.12040.31430.44800.03120.947132.231510 min0.11800.29820.43980.02960.951931.659815 min0.12060.30500.42770.03030.952331.2409High Variability5 min1.04833.32120.00890.01230.99760.889710 min0.95762.47050.00820.00910.99890.823215 min0.89081.89400.00780.00690.99950.7788Linear RegressionNight-Time5 min0.18130.48630.67480.04830.873348.551110 min0.15410.44610.57420.04430.892341.330215 min0.14340.40910.50870.04060.914237.1609High Variability5 min2.50587.48350.02130.02760.98792.126710 min1.61275.39730.01390.01980.99471.386415 min1.22133.47010.01070.01260.99821.0677Ridge RegressionNight-Time5 min0.18130.48730.67470.04840.872848.545710 min0.15380.45770.57320.04550.886641.257815 min0.14420.41580.51150.04130.911437.3622High Variability5 min2.43247.46050.02060.02750.98802.064510 min1.66195.42080.01430.01990.99461.428715 min1.23013.47870.01080.01270.99821.0755Lasso RegressionNight-Time5 min0.18260.48420.67960.04810.874348.897410 min0.15280.43760.56940.04350.896440.988915 min0.13980.39120.49590.03890.921536.2241High Variability5 min2.37347.45640.02010.02750.98802.014310 min1.50095.35770.01290.01960.99471.290315 min1.11063.39880.00970.01240.99830.9709Elastic NetNight-Time5 min0.18260.48420.67960.04810.874348.897410 min0.15280.43760.56940.04350.896440.988915 min0.13980.39120.49590.03890.921536.2241High Variability5 min2.37347.45640.02010.02750.98802.014310 min1.50095.35770.01290.01960.99471.290315 min1.11063.39880.00970.01240.99830.9709 Table 9Stress Test Performance Metrics.ModelScenarioIntervalMAERMSEnMAEnRMSER²WAPE (%)XGBoostNight-Time5 min0.42410.55091.57860.05470.8374113.580310 min0.42870.56981.59740.05660.8242114.990615 min0.41370.53251.46710.05290.8546107.1648High Variability5 min1.39013.12720.01180.01150.99791.179810 min1.32742.79860.01140.01030.99861.141115 min1.18972.30090.01040.00840.99921.0401Decision TreeNight-Time5 min0.12040.31430.44800.03120.947132.231510 min0.11800.29820.43980.02960.951931.659815 min0.12060.30500.42770.03030.952331.2409High Variability5 min1.04833.32120.00890.01230.99760.889710 min0.95762.47050.00820.00910.99890.823215 min0.89081.89400.00780.00690.99950.7788Linear RegressionNight-Time5 min0.18130.48630.67480.04830.873348.551110 min0.15410.44610.57420.04430.892341.330215 min0.14340.40910.50870.04060.914237.1609High Variability5 min2.50587.48350.02130.02760.98792.126710 min1.61275.39730.01390.01980.99471.386415 min1.22133.47010.01070.01260.99821.0677Ridge RegressionNight-Time5 min0.18130.48730.67470.04840.872848.545710 min0.15380.45770.57320.04550.886641.257815 min0.14420.41580.51150.04130.911437.3622High Variability5 min2.43247.46050.02060.02750.98802.064510 min1.66195.42080.01430.01990.99461.428715 min1.23013.47870.01080.01270.99821.0755Lasso RegressionNight-Time5 min0.18260.48420.67960.04810.874348.897410 min0.15280.43760.56940.04350.896440.988915 min0.13980.39120.49590.03890.921536.2241High Variability5 min2.37347.45640.02010.02750.98802.014310 min1.50095.35770.01290.01960.99471.290315 min1.11063.39880.00970.01240.99830.9709Elastic NetNight-Time5 min0.18260.48420.67960.04810.874348.897410 min0.15280.43760.56940.04350.896440.988915 min0.13980.39120.49590.03890.921536.2241High Variability5 min2.37347.45640.02010.02750.98802.014310 min1.50095.35770.01290.01960.99471.290315 min1.11063.39880.00970.01240.99830.9709 Stress Test Performance Metrics. Walk-forward validation metrics The Walk-Forward Validation Metrics are employed to evaluate the generalization ability and stability of PV forecasting models under conditions that closely resemble real-time deployment, ensuring their reliability in handling sequential time-series data. This validation strategy applies to a walk-forward approach using TimeSeriesSplit with five folds, where the models are iteratively trained on historical observations and validated on subsequent future segments while maintaining chronological order. In each fold, the training window expands over time, and validation occurs on the next contiguous temporal block, thereby simulating an operational forecasting environment. Table 10 reports the results of this procedure in terms of RMSE, MAE, R2, nMAE, nRMSE, and WAPE, presented as mean values with corresponding ± SD calculated across folds. This provides not only an overall measure of performance but also an indication of variability and robustness. The evaluation is carried out by computing the designated metrics for each fold, based on the differences between predicted and actual Active_Power values, followed by averaging the results across all folds and quantifying the dispersion through SDs. The findings highlight that Decision Tree regression achieved the lowest MAE at the 5-minute resolution (0.4417 ± 0.1188 kW), demonstrating consistent accuracy across folds. Similarly, XGBoost maintained exceptionally high explanatory power, with R2 = 0.9997 ± 0.0001, pointing to its strong reliability in capturing variance. The SD values further illustrate stability across folds, for example, XGBoost’s RMSE of 0.3212 at the 5-minute horizon signals robustness, whereas linear models exhibited greater variability such as Linear Regression with an RMSE SD of 0.8197. This comparative analysis confirms that walk-forward validation offers a reliable assessment framework, highlighting models that generalize effectively to sequential PV forecasting tasks while revealing sensitivities to data shifts. Table 10Walk-Forward Validation Metrics.ModelIntervalRMSE ± SDMAE ± SDR² ± SDnMAE ± SDnRMSE ± SDWAPE ± SDXGBoost5 min1.2895 ± 0.32120.7252 ± 0.11620.9997 ± 0.00010.0191 ± 0.00740.0048 ± 0.00121.9102 ± 0.736210 min1.2112 ± 0.25640.7446 ± 0.13300.9997 ± 0.00010.0199 ± 0.00850.0045 ± 0.00091.9875 ± 0.845615 min1.2271 ± 0.34370.7384 ± 0.12040.9997 ± 0.00010.0198 ± 0.00830.0045 ± 0.00121.9768 ± 0.8297Decision Tree5 min1.1984 ± 0.34910.4417 ± 0.11880.9998 ± 0.00010.0113 ± 0.00480.0044 ± 0.00131.1286 ± 0.474610 min1.1703 ± 0.25300.5145 ± 0.21900.9998 ± 0.00010.0137 ± 0.00900.0043 ± 0.00091.3693 ± 0.893115 min1.1669 ± 0.38930.4626 ± 0.12760.9998 ± 0.00010.0118 ± 0.00510.0043 ± 0.00141.1821 ± 0.5091Linear Regression5 min2.3383 ± 0.81970.8255 ± 0.14480.9991 ± 0.00050.0211 ± 0.00630.0086 ± 0.00302.1107 ± 0.624810 min1.8325 ± 0.52890.7284 ± 0.10100.9994 ± 0.00030.0194 ± 0.00770.0067 ± 0.00191.9405 ± 0.772515 min1.5081 ± 0.54680.6813 ± 0.09760.9996 ± 0.00030.0184 ± 0.00800.0055 ± 0.00201.8407 ± 0.7929Ridge Regression5 min2.3559 ± 0.80230.8293 ± 0.13810.9990 ± 0.00050.0213 ± 0.00630.0087 ± 0.00292.1216 ± 0.625010 min1.8348 ± 0.53020.7304 ± 0.10170.9994 ± 0.00030.0195 ± 0.00770.0067 ± 0.00191.9440 ± 0.770115 min1.5161 ± 0.54450.6880 ± 0.10440.9996 ± 0.00030.0187 ± 0.00820.0055 ± 0.00201.8624 ± 0.8149Lasso Regression5 min2.3697 ± 0.78140.8532 ± 0.10430.9990 ± 0.00050.0227 ± 0.00860.0088 ± 0.00292.2617 ± 0.852410 min1.8592 ± 0.48700.7511 ± 0.09560.9994 ± 0.00030.0207 ± 0.00970.0068 ± 0.00182.0702 ± 0.966615 min1.5356 ± 0.51530.6994 ± 0.09290.9996 ± 0.00020.0195 ± 0.00970.0056 ± 0.00191.9507 ± 0.9626Elastic Net5 min2.3697 ± 0.78140.8532 ± 0.10430.9990 ± 0.00050.0227 ± 0.00860.0088 ± 0.00292.2617 ± 0.852410 min1.8592 ± 0.48700.7511 ± 0.09560.9994 ± 0.00030.0207 ± 0.00970.0068 ± 0.00182.0702 ± 0.966615 min1.5356 ± 0.51530.6994 ± 0.09290.9996 ± 0.00020.0195 ± 0.00970.0056 ± 0.00191.9507 ± 0.9626 Table 10Walk-Forward Validation Metrics.ModelIntervalRMSE ± SDMAE ± SDR² ± SDnMAE ± SDnRMSE ± SDWAPE ± SDXGBoost5 min1.2895 ± 0.32120.7252 ± 0.11620.9997 ± 0.00010.0191 ± 0.00740.0048 ± 0.00121.9102 ± 0.736210 min1.2112 ± 0.25640.7446 ± 0.13300.9997 ± 0.00010.0199 ± 0.00850.0045 ± 0.00091.9875 ± 0.845615 min1.2271 ± 0.34370.7384 ± 0.12040.9997 ± 0.00010.0198 ± 0.00830.0045 ± 0.00121.9768 ± 0.8297Decision Tree5 min1.1984 ± 0.34910.4417 ± 0.11880.9998 ± 0.00010.0113 ± 0.00480.0044 ± 0.00131.1286 ± 0.474610 min1.1703 ± 0.25300.5145 ± 0.21900.9998 ± 0.00010.0137 ± 0.00900.0043 ± 0.00091.3693 ± 0.893115 min1.1669 ± 0.38930.4626 ± 0.12760.9998 ± 0.00010.0118 ± 0.00510.0043 ± 0.00141.1821 ± 0.5091Linear Regression5 min2.3383 ± 0.81970.8255 ± 0.14480.9991 ± 0.00050.0211 ± 0.00630.0086 ± 0.00302.1107 ± 0.624810 min1.8325 ± 0.52890.7284 ± 0.10100.9994 ± 0.00030.0194 ± 0.00770.0067 ± 0.00191.9405 ± 0.772515 min1.5081 ± 0.54680.6813 ± 0.09760.9996 ± 0.00030.0184 ± 0.00800.0055 ± 0.00201.8407 ± 0.7929Ridge Regression5 min2.3559 ± 0.80230.8293 ± 0.13810.9990 ± 0.00050.0213 ± 0.00630.0087 ± 0.00292.1216 ± 0.625010 min1.8348 ± 0.53020.7304 ± 0.10170.9994 ± 0.00030.0195 ± 0.00770.0067 ± 0.00191.9440 ± 0.770115 min1.5161 ± 0.54450.6880 ± 0.10440.9996 ± 0.00030.0187 ± 0.00820.0055 ± 0.00201.8624 ± 0.8149Lasso Regression5 min2.3697 ± 0.78140.8532 ± 0.10430.9990 ± 0.00050.0227 ± 0.00860.0088 ± 0.00292.2617 ± 0.852410 min1.8592 ± 0.48700.7511 ± 0.09560.9994 ± 0.00030.0207 ± 0.00970.0068 ± 0.00182.0702 ± 0.966615 min1.5356 ± 0.51530.6994 ± 0.09290.9996 ± 0.00020.0195 ± 0.00970.0056 ± 0.00191.9507 ± 0.9626Elastic Net5 min2.3697 ± 0.78140.8532 ± 0.10430.9990 ± 0.00050.0227 ± 0.00860.0088 ± 0.00292.2617 ± 0.852410 min1.8592 ± 0.48700.7511 ± 0.09560.9994 ± 0.00030.0207 ± 0.00970.0068 ± 0.00182.0702 ± 0.966615 min1.5356 ± 0.51530.6994 ± 0.09290.9996 ± 0.00020.0195 ± 0.00970.0056 ± 0.00191.9507 ± 0.9626 Walk-Forward Validation Metrics. Comprehensive performance across datasets and seasons Tables 6, 7, 8, 9 and 10 reveal Decision Tree’s lowest MAE (0.3313 at 15-minute training) and highest Skill Scores (up to 97.2388%), driven by its nonlinear capture of PV patterns. XGBoost balances robust generalization (R² ≈ 0.9997) with high computational cost (231.09 s tuning). Linear models are efficient (0.13 s tuning) but error-prone (e.g., RMSE = 5.4889 in autumn), and persistence (WAPE = 19.8290%) lag. Conclusion and future work This study conducted a comprehensive benchmarking of six machine learning models for short-term PV power forecasting using sub-hourly field data resampled at 5-, 10-, and 15-minute intervals. The Decision Tree model consistently outperformed all others, achieving a minimum Mean Absolute Error (MAE) of 0.33 kW at the 15-minute resolution and maximum skill scores up to 98% across all temporal horizons. XGBoost also performed robustly, with an MAE within 0.35–0.55 kW and skill scores above 95%. In contrast, linear regression-based models exhibited higher errors (MAE > 0.65 kW) and lower skill, reflecting their limited capacity to capture nonlinear dynamics in PV generation. The proposed preprocessing pipeline, featuring temporal cyclical encoding and targeted lagged features, proved effective in enhancing prediction accuracy and model stability. Stress tests under night-time and high-variability irradiance intervals demonstrated that tree-based models retained high predictive skill (above 90%), highlighting their robustness in challenging scenarios. A limitation of this study is that all experiments were conducted on a single PV site (Yulara, Australia); therefore, the generalizability of the findings to other geographical locations, climatic conditions, and plant capacities remains to be further validated. Overall, these quantitative results suggest that advanced tree-based machine learning approaches can offer advantages in accuracy, resilience, and operational relevance for integrating PV power into grids like the one studied. To advance the field and address the study’s limitations, several avenues for future research are proposed. Future research should validate the proposed models on multiple PV plants located in different climatic zones and with varying installed capacities, to assess the transferability of the tree-based benchmarking results. Additionally, more advanced hyperparameter optimisation techniques, such as Bayesian optimisation, could be explored to further improve model efficiency and performance, especially when scaling larger datasets or more complex architectures. Expanding the methodological framework to incorporate hybrid and DL models, including attention-based architectures and ensemble strategies, may further enhance prediction accuracy and generalisation across sites. In particular, the hybrid and DL models mentioned in the Introduction (LSTM, BiLSTM, transformers) will be systematically benchmarked in future work to compare their performance against the tree-based baselines established here. Integrating real-time meteorological data and broader geospatial datasets will support the development of transferable forecasting systems and enable more granular adaptation to local climatic variability. Additionally, extending forecast horizons beyond 15 min, and applying probabilistic and uncertainty quantification techniques, can improve the operational value of forecasts for grid operators. Finally, focusing on the interpretability and transparency of machine learning models and investigating their real-time deployment and computational scalability in utility environments will be pivotal for wider adoption in smart grid and renewable energy applications. Supplementary Information Below is the link to the electronic supplementary material. Supplementary Material 1 Supplementary Material 1