Enhancing Weather Forecasting Accuracy: A Machine Learning Approach Using Genetic Algorithm and Random Forest

Authors

  • Fardad Ali Shah BS-Computer Science, Department of Computer Science, University of Chitral, Pakistan Author
  • Ayesha Bint E Meraj BS-Computer Science, Department of Computer Science, University of Chitral, Pakistan Author
  • Malak Roman Lecturer, Department of Computer Science, University of Chitral, Pakistan Author
  • Masood Anwar Lecturer, Department of Computer Science, University of Chitral, Pakistan Author
  • Awrang Zaib Lecturer, Department of Computer Science, University of Chitral, Pakistan Author
  • Sana Shaiza Shams BS-Computer Science, Department of Computer Science, University of Chitral, Pakistan Author
  • Farzana Hussain BS-Computer Science, Department of Computer Science, University of Chitral, Pakistan Author

DOI:

https://doi.org/10.53762/grjnst.03.03.14

Keywords:

Weather Forecasting, Machine Learning, Random Forest Algorithm, Genetic Algorithm, Feature Selection.

Abstract

Weather prediction plays a vital role in numerous fields, including agriculture, transportation, and emergency response. However, the intricate and nonlinear nature of atmospheric progressions makes accurate forecasting a persistent challenge. This research explores the application of machine learning, particularly Random Forest (RF) algorithm to improve weather prediction using historical meteorological data. The study employs a dataset comprising 13,202 records with 11 weather-related variables. Two distinct models were developed: one using raw, unprocessed data and another incorporating Genetic Algorithm (GA)-based feature selection to identify optimal predictors. Both models were evaluated on a test of 3,960 instances. Results indicate that the GA-enhanced model outperformed the baseline, achieving an accuracy of 92.65% compared to 91.31%.  Additional metrics, including kappa statistics, MAE, RMSE, precision, recall, and F-measure further validated the model’s robustness. Notably, both models exhibited strong discriminative ability, with ROC and PRC areas exceeding 0.98, while the optimized model maintained high performance with reduced dimensionality. This study demonstrates that combining Random Forest with Genetic Algorithm-driven feature selection significantly enhances weather prediction accuracy. The proposed approach offers a reliable framework for developing efficient forecasting systems, with potential applications in real-time and long-term meteorological analysis.

Downloads

Download data is not yet available.

Downloads

Published

2026-01-02

Issue

Section

Articles