Impacts of renewable and non-renewable energy on CO₂ emissions in Egypt’s electricity Generation: A K-nearest neighbor approach
Abstract
This paper employs the K-Nearest Neighbor (k-NN) algorithm to examine the relationship between electricity generation—using renewable and non-renewable energy sources—and carbon dioxide (CO₂) emissions. The model achieved strong predictive accuracy, with a mean squared error (MSE) of 134.9 and an R² value of 0.915. Two analytical approaches were applied: the first included both renewable and non-renewable energy sources to determine the largest contribution of each energy source, and the second excluded non-renewable sources to assess the relative importance of different types of renewable energy. In the first approach, fossil fuel-fired electricity generation contributed 98.04% of the impact on carbon dioxide emissions, confirming its dominant role in increasing global carbon emissions. Renewable energy sources, however, had limited contributions: solar (1.16%), wind (0.71%), hydropower (0.09%), and bioenergy showed a negligible impact. In the second approach—excluding fossil fuels—renewable energy sources gained relative importance, with wind energy emerging as the most influential factor in the model (80.24%), followed by solar (10.92%), and hydropower (8.84%). Bioenergy remained insignificant in both models. The study concludes that fossil fuel–based electricity generation remains the principal driver of CO₂ emissions globally. though, among renewable sources, wind energy exhibits the greatest potential for reducing emissions when fossil fuels are excluded, highlighting its strategic importance in future clean energy transitions. The findings confirm the need for global energy policies that prioritize expanding renewable energy infrastructure, particularly solar and hydropower, while phasing out reliance on fossil fuels. countries should focus on stimulating investment in clean energy, developing efficiency-enhancing technologies, and expanding renewable energy generation to achieve long-term carbon reduction and environmental sustainability while maintaining economic growth.
Authors

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