Machine Learning Prediction of Photovoltaic Power Output from Environmental Variables
Keywords:
photovoltaic power prediction, machine learning, Random Forest, support vector regression, XGBoost, SHAP, time-series cross-validationAbstract
The accurate prediction of photovoltaic (PV) power output enables the reliable integration of solar power into electricity grids, but the comparisons of machine learning models published in the literature often differ in the method of handling data, the method of validation, and the extent to which the models are interpretable. Authors developed a simple and repeatable computational framework that uses solar energy data from a real and publicly available hourly dataset of around 8,000 observations, including solar irradiance, temperature, humidity, wind speed, and PV power output, to predict PV power output from environmental data. Preprocessing of the data, treatment of missing values and engineering of the temporal and lagged features were done prior to splitting the data in chronological order into a training (70 %), a validation (15 %), and a testing subset (15 %). Random Forest Regression, Support Vector Regression and XGBoost were implemented in Python, and their hyperparameters were optimized by using Bayesian search and expanding-window time-series cross validation during the training process. The untouched test subset was used to assess the predictive performance of the models and to determine the most influential environmental variables, using the mean absolute error (MAE), the root mean square error (RMSE) and the coefficient of determination (R²) metrics, and applying Shapley additive explanations (SHAP). Reproducibility was facilitated by fixed random seeds, version controlled code, recorded software environment and documented data lineage.
Downloads
Published
Issue
Section
License
Copyright (c) 2026 Aqsa Sayyad

This work is licensed under a Creative Commons Attribution 4.0 International License.








