Can machine learning improve daily rainfall prediction in Lagos and make those predictions accessible to non-technical users?
This study compared three machine learning classification modelsโlogistic regression, random forest, and support vector machineโfor predicting whether rainfall would occur on a given day in Lagos, Nigeria.
The researchers used a 22-year meteorological dataset containing 8,314 observations and engineered additional variables including daily temperature range and a seasonal indicator.
Because failing to predict an actual rainfall event can have greater consequences than issuing a false rain alert, the study used Youdenโs J statistic to optimise the decision threshold of each model and increase sensitivity.
Random forest achieved the strongest overall performance, recording an accuracy of 76.28%, sensitivity of 79.27%, F1-score of 76.44%, and an AUC-ROC of 0.8454.
Support vector machine achieved an AUC-ROC of 0.8215, while logistic regression recorded an AUC-ROC of 0.8001.
Across the three models, humidity, cloud cover, dew point, and visibility emerged as the most consistent predictors of daily rainfall.
In contrast, moon phase and wind speed showed little predictive importance.
The researchers also deployed all three trained models in an interactive R Shiny web application.
The application allows non-technical users, including farmers, planners, and policymakers, to enter meteorological information and obtain real-time rainfall predictions.
The findings demonstrate the practical value of combining machine learning with accessible web-based tools to support rainfall-related decision-making in Lagos and similar developing-country environments.
๐ Read the full article here:
https://doi.org/10.46481/asr.2026.5.3.541
Published in: African Scientific Reports