Flood Prediction with LightGBM

An end-to-end machine learning regression pipeline predicting flood-related continuous outcomes from structured environmental data.

Python LightGBM Scikit-learn Pandas Regression
View on GitHub Open Kaggle Notebook

Overview

Flood prediction involves environmental, geographical, meteorological and infrastructure-related variables. This project develops a reproducible regression pipeline using LightGBM to learn the relationship between input features and a continuous flood-probability target, covering the complete ML lifecycle from raw data to reusable inference.

Purpose — Why This Project Exists

Flood-prone regions and infrastructure planners need early, data-driven risk estimates rather than reacting after water is already rising. This project demonstrates a reusable, explainable regression pipeline that can be retrained on new regional data to produce a continuous flood-probability estimate, with feature importance that tells decision-makers which environmental factors are actually driving the risk.

Animated Pipeline

1
Raw Dataset
Environmental & infrastructure variables loaded.
2
Preprocessing
Missing-value imputation and encoding.
3
Feature Prep
Feature selection and ID-column exclusion.
4
LightGBM Training
Gradient-boosted trees learn the flood target.
5
Evaluation
MAE, RMSE, R², MAPE and feature importance.
6
Prediction
Saved pipeline scores new, unseen data.

Key Features

Flood Regression — complete workflow for structured environmental data.
LightGBM — efficient gradient-boosted decision-tree regression.
Automatic Preprocessing — missing-value imputation, categorical encoding, ID exclusion.
Evaluation — MAE, RMSE, R² and MAPE, saved as machine-readable metrics.
Feature Importance — ranks the most influential predictors.
Model Persistence & Reusable Inference — joblib pipeline plus a dedicated prediction script for new CSV files.

Benefits

Proactive Planning

Estimates risk ahead of time instead of reacting once flooding starts.

Reusable Pipeline

Retrain on any new region's dataset with the same modular code.

Transparent Drivers

Feature importance shows exactly what's driving each prediction.

Fast Iteration

Saved joblib pipeline + inference script means quick re-scoring of new data.

Technology Stack

Python LightGBM Scikit-learn Pandas NumPy Matplotlib Joblib Kaggle