Coastal flooding is one of the most severe natural hazards, causing significant damage to human life, infrastructure, and ecosystems in coastal regions. Accurate and timely flood prediction is essential for effective disaster preparedness and mitigation. This research presents a Coastal Flood Prediction System based on Machine Learning techniques to improve the accuracy and efficiency of flood forecasting. The proposed system utilizes environmental parameters such as rainfall, humidity, sea level, and wind speed to predict the likelihood of flood occurrence. Data preprocessing techniques are applied to clean and prepare the dataset, followed by the implementation of machine learning algorithms, including Logistic Regression, Decision Tree, and Random Forest. Among these, the Random Forest algorithm demonstrates superior performance in terms of prediction accuracy and reliability. The developed system is integrated into a user-friendly web application using Python and Flask, enabling users to obtain real-time flood predictions. Experimental results indicate that the proposed model effectively identifies flood-prone conditions and supports early warning decision-making. The study highlights the potential of machine learning in disaster management and provides a scalable framework for future flood prediction systems. The proposed approach can contribute to reducing the impact of floods by enabling proactive planning and timely response measures.
Introduction
This paper presents a Coastal Flood Prediction System that uses Machine Learning (ML) to improve the accuracy and timeliness of flood forecasting. Floods, particularly in coastal regions, cause severe damage to life, infrastructure, the economy, and the environment. Traditional flood prediction methods based on hydrological models and historical data often struggle to handle complex environmental relationships and large datasets. To address these limitations, the proposed system applies machine learning techniques to predict flood occurrences using environmental parameters such as rainfall, humidity, sea level, and wind speed.
The literature survey highlights that machine learning has become an effective approach for flood prediction, offering greater accuracy and reliability than conventional statistical methods. Previous studies demonstrate that algorithms, particularly ensemble methods like Random Forest, can effectively analyze multiple environmental factors and provide reliable early warning predictions, thereby supporting disaster preparedness and risk management.
The development of the system involves several challenges, including obtaining high-quality environmental data, handling missing or inconsistent values, selecting relevant features, choosing the most suitable machine learning algorithm, preventing model overfitting and underfitting, integrating the prediction model into a user-friendly web application, and ensuring scalability and fast response times.
The proposed methodology begins with collecting environmental data from reliable sources, followed by preprocessing to remove noise, inconsistencies, and missing values. Important features affecting flood occurrence are selected, and three machine learning algorithms—Logistic Regression, Decision Tree, and Random Forest—are trained and evaluated using historical data. Based on performance, Random Forest is selected as the final prediction model due to its superior accuracy and robustness. The trained model is integrated into a Flask-based web application, allowing users to input environmental parameters and receive real-time flood predictions through an intuitive interface.
The system utilizes several technologies and tools, including Python as the primary programming language, Scikit-learn for machine learning implementation, Pandas and NumPy for data preprocessing and numerical analysis, Flask for backend development, HTML and CSS for the frontend interface, and Jupyter Notebook for model development and experimentation.
The proposed architecture consists of four main stages: data collection, data preprocessing, machine learning prediction, and result generation. Environmental data is processed and analyzed by trained machine learning models to predict flood likelihood, with prediction results displayed through the Flask web application. This architecture supports accurate forecasting, early warning generation, and effective disaster management.
The implemented system successfully predicts flood occurrences using rainfall, humidity, sea level, and wind speed as input features. Comparative evaluation of Logistic Regression, Decision Tree, and Random Forest models showed that the Random Forest algorithm achieved the highest prediction accuracy, making it the preferred model. The application provides a user-friendly home page, an input interface for environmental parameters, a prediction results page indicating whether a flood is likely to occur, and model training outputs displaying evaluation metrics such as accuracy, precision, recall, and F1-score. Overall, the proposed system offers an accurate, reliable, and cost-effective solution for coastal flood prediction, supporting early warning systems and improving disaster management decision-making.
Conclusion
The Coastal Flood Prediction Using Machine Learning project successfully demonstrates the application of intelligent data-driven techniques for predicting flood occurrences in coastal regions. The system utilizes environmental parameters such as rainfall, humidity, sea level, and wind speed to analyze flood risk and generate accurate predictions. Various machine learning algorithms, including Logistic Regression, Decision Tree, and Random Forest, were implemented and evaluated to identify the most effective prediction model. Among these algorithms, Random Forest achieved superior performance due to its high accuracy, robustness, and ability to handle complex environmental datasets. The integration of the prediction model with a Flask-based web application provides a user-friendly platform for entering environmental data and obtaining prediction results in real time. The developed system can support early warning mechanisms, assist disaster management authorities in decision-making, and help reduce the impact of floods on vulnerable coastal communities. Furthermore, the project highlights the potential of machine learning techniques in addressing real-world environmental challenges and improving disaster preparedness. Overall, the proposed system offers an efficient, reliable, and cost-effective solution for coastal flood forecasting and contributes to the advancement of smart disaster management systems.
References
[1] Breiman, L. (2001). Random forests. Machine Learning, 45(1), 5-32. https://doi.org/10.1023/A:1010933404324
[2] Quinlan, J. R. (1986). Induction of decision trees. Machine Learning, 1(1), 81-106. https://doi.org/10.1007/BF00116251
[3] Hosmer, D. W., Lemeshow, S., & Sturdivant, R. X. (2013). Applied Logistic Regression (3rd ed.). John Wiley & Sons. https://doi.org/10.1002/9781118548387
[4] Biau, G., & Scornet, E. (2016). A random forest tutorial. Test, 25(2), 197-227. https://doi.org/10.1007/s11749-016-0481-7
[5] Mosavi, A., Ozturk, P., & Chau, K. W. (2018). Flood prediction using machine learning models: Literature review. Water, 10(11), 1536. https://doi.org/10.3390/w10111536
[6] Tehrany, M. S., Pradhan, B., & Jebur, M. N. (2014). Flood susceptibility mapping using a comparative assessment of decision tree, support vector machine, and adaptive neuro-fuzzy inference system models. International Journal of Applied Earth Observation and Geoinformation, 63, 33-42. https://doi.org/10.1016/j.jag.2013.11.003
[7] Kumar, V., Sharma, K. V., Mangukiya, N. K., Tiwari, D. K., Ramkar, P. V., & Rathnayake, U. (2025). Machine learning applications in flood forecasting and predictions, challenges, and way-out in the perspective of changing environment. AIMS Environmental Science, 12(1), 72-105. https://doi.org/10.3934/environsci.2025004
[8] Vaidya, C., Shelar, P., Ukey, J., Kawale, T., Bawankar, C., Diwate, M., & Bhure, K. (2023). Flood prediction using machine learning. AIP Conference Proceedings, 2753(1), 030001. https://doi.org/10.1063/5.0127968
[9] Rajab, A., Farman, H., Islam, N., Syed, D., Elmagzoub, M. A., Shaikh, A., Akram, M., & Alrizq, M. (2023). Flood forecasting by using machine learning: A study leveraging historic climatic records. Water, 15(22), 3970. https://doi.org/10.3390/w15223970
[10] Idier, D., Aurouet, A., Bachoc, F., Baills, A., Betancourt, J., Gamboa, F., Klein, T., López-Lopera, A. F., Pedreros, R., Rohmer, J., & Thibault, A. (2021). A user-oriented local coastal flooding early warning system using metamodelling techniques. Journal of Marine Science and Engineering, 9(11), 1191. https://doi.org/10.3390/jmse9111191
[11] Yang, N. (2025). Machine learning models for early warning of coastal flooding and storm surges. Smart Maritime Science, 4(2), 112-128.
[12] Dimri, P., & Nath, A. (2024). Flood prediction and management. ITEGAM- Journal of Engineering and Technology for Industrial Applications, 10(47), 15-24. https://doi.org/10.5935/jetia.v10i47.1103
[13] Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O., Blondel, M., Prettenhofer, P., Weiss, R., Dubourg, V., Vanderplas, J., Passos, A., Cournapeau, D., Brucher, M., Perrot, M., & Duchesnay, E. (2011). Scikit-learn: Machine learning in Python. Journal of Machine Learning Research, 12, 2825-2830.
[14] Harris, C. R., Millman, K. J., van der Walt, S. J., Gommers, R., Virtanen, P., Cournapeau, D., … & Oliphant, T. E. (2020). Array programming with NumPy. Nature, 585(7825), 357-362. https://doi.org/10.1038/s41586-020-2649-2
[15] McKinney, W. (2010). Data structures for statistical computing in Python. Proceedings of the 9th Python in Science Conference, 445, 51-56. https://doi.org/10.25080/Majora-92bf1845-00a
[16] Grinberg, M. (2018). Flask Web Development: Developing Web Applications with Python. O’Reilly Media.
[17] Fawcett, T. (2006). An introduction to ROC analysis. Pattern Recognition Letters, 27(8), 861-874.
[18] Crockford, D. (2006). The application/json Media Type for JavaScript Object Notation (JSON). IETF RFC 4627.
[19] Svetnik, V., Liaw, A., Tong, C., Culberson, J. C., Sheridan, R. P., & Feuston, B. P. (2003). Random forest: A classification and regression tool for quantitative structure-activity relationships. Journal of Chemical Information and Computer Sciences, 43(6), 1947-1958. https://doi.org/10.1021/ci034160g
[20] Ibrahim, M., & Owaidat, A. (2024). Enhancing hydrological predictions: Optimised decision tree modelling for improved monthly forecasting. Journal of Hydroinformatics, 26(11), 2683-2699. https://doi.org/10.2166/jh.2024.104