Skip to content
Open access

Daily rainfall prediction in Lagos using logistic regression, random forest, and support vector machine with web development

Aug 2026 · African Scientific Reports · 0 citations · 13 references

TL;DR

An end-to-end rainfall prediction pipeline tailored to the Lagos environment is provided and the practical value of coupling ML with accessible deployment frameworks for climate decision-making in developing countries is demonstrated.

Abstract

Accurate rainfall prediction is critical for agricultural planning, flood-risk management, and urban infrastructure resilience, particularly in tropical coastal cities such as Lagos, Nigeria, where unpredictable rainfall events cause significant socioeconomic disruption. This study evaluates three machine learning (ML) classification models---logistic regression (LR), random forest (RF), and support vector machine (SVM)---for daily binary rainfall prediction using a 22-year meteorological dataset of 8,314 observations sourced from Visual Crossing. Two features were engineered from the raw data: daily temperature range and a seasonal indicator. To address the asymmetric cost of false negatives in a tropical rainfall context, Youden's J statistic was applied to optimise the decision threshold of each model, prioritising sensitivity over the conventional 0.5 default. RF achieved the strongest overall performance, recording an accuracy of 76.28%, sensitivity of 79.27%, F1-score of 76.44%, and area under the receiver operating characteristic curve (AUC-ROC) of 0.8454, outperforming SVM (AUC-ROC: 0.8215) and LR (AUC-ROC: 0.8001). Humidity, cloud cover, dew point, and visibility emerged as the most consistent predictors across models, while moon phase and wind speed showed negligible importance in all three classifiers. All three trained models were deployed in an interactive R Shiny web application, enabling non-technical users, including farmers, planners, and policymakers, to obtain real-time rainfall predictions from meteorological inputs. This study provides an end-to-end rainfall prediction pipeline tailored to the Lagos environment and demonstrates the practical value of coupling ML with accessible deployment frameworks for climate decision-making in developing countries.

Read PDF

Similar papers

Open access Aug 2026

Machine Learning-Informed Hydrological Response Time Modeling in Tropical Watersheds

Flood occurrence in tropical regions is intensifying due to climate variability and land-use change, increasing the need for reliable flood response time estimation. Accurate prediction of flood lag time (TL)—the interval between the centroid of excess rainfall and peak runoff—is critical for flood early warning and wa...

Dagnenet Sultan, N. Haregeweyn, M. Tsubo et al. · 0 citations
Open access Aug 2026

Performance Comparison of Random Forest, Support Vector Machine, and K-Nearest Neighbors Algorithms in Ten-Minute Rainfall Prediction for Urban Flood Mitigation in South Tangerang

Rainfall prediction with very high temporal resolution, such as ten-minute intervals, is of great urgency in urban flood mitigation, especially in densely populated areas such as South Tangerang. Most previous studies still focus on daily or monthly rainfall prediction, so this study attempts to fill this gap by compar...

Tri Nurmayati · 0 citations
Open access Sep 2026

Modeling Flood Prediction Using Logistic Regression Enhanced with Machine Learning

A data-driven flood prediction model by integrating logistic regression with machine learning techniques to improve early warning systems in Nigeria and demonstrates that combining statistical modeling with machine learning improves flood prediction reliability and supports disaster management decision-making.

D. Shobanke, Happiness I. Olatunde, E. O. Ajare · 0 citations
Open access Sep 2026

Rainfall frequency and uncertainty analysis in arid regions using machine learning and statistical distribution models based on a 91-year rainfall record

Accurate estimation of rainfall depths associated with standard return periods is fundamental for hydraulic design, flood risk assessment, and water resources management, particularly in arid regions. Statistical extreme value distributions have long been the standard approach for rainfall frequency analysis, whereas m...

M. Hagage · 0 citations
Open access Sep 2026

Ensemble Learning for Rainfall Extremes: Threshold-Based Forecasting in the Cauvery Delta Zone

This study investigates rainfall and temperature extremes across six agricultural blocks in the Cauvery Delta Zone (CDZ), Tiruchirappalli district, Tamil Nadu, using daily meteorological data from 1981 to 2023. A comprehensive set of climate indices—including Consecutive Dry Days (CDD), Consecutive Wet Days (CWD), Tota...

Easwaran S, Guhan Velusamy, Annadurai K et al. · 0 citations
Conference Sep 2026

A Calibration-Aware Comparative Regression Framework for Local Rainfall Probability Estimation and Rain-Risk Classification

Estimating rainfall likelihood supports agriculture, irrigation planning, and local weather decision-making. This study evaluates ten regression-based machine learning models for next-day rain occurrence using 346 daily weather records from Kuantan, Pahang, Malaysia, covering 2025. Weather and lagged features were used...

N. Ahmad, Ameerah Muhsinah Binti Jamil, Nabilah Filzah Mohd Radzuan et al. · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.