Predicting flood occurrence using Machine Learning algorithms based on environmental and geographical factors.
Floods are among the most destructive natural disasters, causing significant damage to human life, infrastructure, and the environment.
This project uses Machine Learning techniques to predict whether a flood is likely to occur based on various environmental and geographical parameters. Three different classification algorithms are implemented and compared to identify the best-performing model.
- Predict flood occurrence using historical environmental data.
- Compare the performance of multiple Machine Learning models.
- Identify the most accurate prediction model.
- Build a simple and efficient flood prediction system.
The dataset contains the following features:
- π Latitude
- π Longitude
- π§ Rainfall (mm)
- π‘ Temperature (Β°C)
- π§ Humidity (%)
- π River Discharge (mΒ³/s)
- π Water Level (m)
- β° Elevation (m)
- πΏ Land Cover
- π± Soil Type
- π₯ Population Density
- π Infrastructure
- π Historical Floods
- Flood Occurred
0β Low Flood Risk1β High Flood Risk
- Python
- Google Colab
- Pandas
- NumPy
- Scikit-learn
- Matplotlib
- Seaborn
The following models are implemented:
- Logistic Regression Classifier
- Decision Tree Classifier
- Random Forest Classifier
Dataset
β
βΌ
Data Preprocessing
β
βΌ
Encoding Categorical Data
β
βΌ
Train-Test Split
β
βΌ
Model Training
β
βΌ
Prediction
β
βΌ
Performance Evaluation
| Model | Accuracy |
|---|---|
| Logistic Regression | 90.15% |
| Decision Tree Classifier | 99.40% |
| Random Forest Classifier | 99.55% |
Best Performing Model: Logistic Regression Classifier
Project_1_Flood_Risk_Prediction_System_Using_Machine_Learning/
β
βββ Flood_Risk_Prediction_System.ipynb
βββ Flood_Risk_Prediction_System.py
βββ Dataset/
β βββ flood_risk_india.csv
βββ images/
β βββ confusion_matrix.png
β βββ feature_importance.png
β βββ model_accuracy_comparison.png
βββ best_model.pkl
βββ feature_names.pkl
βββ label_encoders.pkl
βββ scaler.pkl
βββ requirements.txt
βββ README.md
βββ LICENSE
git clone https://github.com/Tuhin092005/Project_1_Flood_Risk_Prediction_System_Using_Machine_Learning.gitcd Project_1_Flood_Risk_Prediction_System_Using_Machine_Learningpip install -r requirements.txtpython Flood_Risk_Prediction_System.pyOpen
Flood_Risk_Prediction_System.ipynb
Upload:
- flood_risk_india.csv
Run all cells.
The model predicts flood risk using two different input scenarios.
Input
Latitude : 22.57
Longitude : 88.36
Rainfall : 250 mm
Temperature : 30Β°C
Humidity : 85%
River Discharge : 500 mΒ³/s
Water Level : 8 m
Elevation : 10 m
Land Cover : 2
Soil Type : 1
Population Density : 5000
Infrastructure : 1
Historical Floods : 3
Expected Output
Prediction : 1
Flood Risk : HIGH
A location with heavy rainfall, high humidity, high water level, and multiple historical floods is predicted as High Flood Risk.
Input
Latitude : 23.50
Longitude : 87.50
Rainfall : 40 mm
Temperature : 28Β°C
Humidity : 55%
River Discharge : 80 mΒ³/s
Water Level : 2 m
Elevation : 120 m
Land Cover : 1
Soil Type : 2
Population Density : 300
Infrastructure : 3
Historical Floods : 0
Expected Output
Prediction : 0
Flood Risk : LOW
A location with low rainfall, lower humidity, higher elevation, and no historical floods is predicted as Low Flood Risk.
- Hyperparameter tuning
- Cross-validation
- Feature importance analysis
- Interactive web application using Streamlit or Flask
- Real-time weather API integration
- Interactive dashboard for visualization
Tuhin Maji
B.Tech in Computer Science & Engineering (AI & ML)
Meghnad Saha Institute of Technology (MSIT), Kolkata
Give this repository a β and feel free to fork it!
This project is intended for educational and learning purposes.
If you like this project,
β Star this repository
π΄ Fork this repository
π’ Share it with others
Happy Coding! π