ML-powered analysis of historical disaster data in Algeria using classification, clustering, and visualization techniques to identify patterns and predict occurrences across different terrain types.
# π Natural Disaster Analysis and Prediction Project
## π Overview
This project leverages machine learning models to analyze and predict natural disasters in Algeria based on historical data. It integrates classification, clustering, and visualization techniques to identify disaster patterns, their relationships with terrain types, and their impact metrics.
## π Features
β
Data preprocessing and cleaning for disaster datasets
β
Decision tree-based disaster type prediction
β
Multiple clustering approaches (KMeans, DBSCAN, GMM, Agglomerative)
β
Impact analysis and visualization
β
Terrain-based pattern recognition
β
Comprehensive visualization suite
## π¦ Requirements
```bash
pandas
numpy
scikit-learn
matplotlib
seaborn
```
## π Project Structure
```
βββ Data/
β βββ 1900_2021_DISASTERS.xlsx
βββ Scripts/
β βββ script.py
βββ README.md
```
## π§ Installation
1. **Clone the repository**:
```bash
git clone
github.com
```
2. **Install required packages**:
```bash
pip install -r requirements.txt
```
## π Usage
### π§Ή Data Preprocessing
Run the cell to clean and preprocess disaster data:
β Loads raw disaster data
β Handles missing values
β Converts data types
β Adds terrain information
β Exports cleaned dataset
### π Classification Model
Execute the classification cell:
Features:
- Decision Tree Classifier
- Terrain-based disaster prediction
- Performance evaluation metrics
- Feature importance analysis
### π Clustering Analysis
Run the clustering cell:
Includes:
- Multiple clustering algorithms
- Optimal cluster determination
- Impact distribution analysis
- Terrain pattern visualization
## π§ Model Details
### π― Classification Model
- **Algorithm**: Decision Tree
- **Hyperparameters**:
- `max_depth`: 10
- `min_samples_leaf`: 5
- `min_samples_split`: 10
- `class_weight`: 'balanced'
### π Clustering Models
- **Algorithms**:
- KMeans
- DBSCAN
- Gaussian Mixture Model (GMM)
- Agglomerative Clustering
- **Features**:
- β¦