# Algeria FireWatch - Real time Risk Estimator π²π₯
## β
Project Overview
This project predicts the *Fire Weather Index (FWI)*, a proxy for fire risk, using meteorological and environmental data across two Algerian regions: Bejaia and Sidi Bel Abbes.
A machine learning model (Ridge) powered by scikit-learn is wrapped in a Flask web app and deployed AWS EC2.
---
## π Dataset
- **Source**: Algerian Forest Fires dataset
- **Timeframe**: JuneβSeptember 2012
- **Regions**: Bejaia (northeast) & Sidi Bel Abbes (northwest)
- **Total instances**: 244 (122 per region)
### Features:
- **Date**
- **Meteorological**:
- Temperature (Β°C)
- Relative Humidity (%)
- Wind Speed (km/h)
- Rain (mm)
- **FWI Components**:
- FFMC
- DMC
- DC
- ISI
- BUI
- **Target**: Fire Weather Index (FWI)
### Ranges:
| Feature | Min | Max |
|--------|------|------|
| Temp | 22β―Β°C | 42β―Β°C |
| RH | 21β―% | 90β―% |
| Ws | 6β―km/h | 29β―km/h |
| Rain | 0β―mm | 16.8β―mm |
| FFMC | 28.6 | 92.5 |
| DMC | 1.1 | 65.9 |
| DC | 7 | 220.4 |
| ISI | 0 | 18.5 |
| BUI | 1.1 | 68.0 |
| FWI | 0 | 31.1 |
---
## π Model Development
- **Preprocessing**:
- Data cleaning
- Type conversion
- Scaling using `StandardScaler`
- Region encoding
- **Algorithm**:
- `Ridge Linear Regression` (L2 regularization)
- **Performance**:
- **RΒ² score** β 0.98
- **Mean Absolute Error (MAE)**: ~0.56
---
## ποΈ Project Structure
```
algerian_forest_fire_predictor/
βββ app.py # Flask application entrypoint
βββ models/
β βββ ridge.pkl # Serialized Ridge Linear Regression model
βββ Scalare.pkl # Serialized Stadard Scalar Model
βββ static/ # CSS/JS files
βββ templates/ # HTML templates (index, result views)
βββ notebooks/
β βββ β¦_EDA.ipynb # Exploratory Data Analysis
β βββ β¦_Model_training.ipynb # Feature engineering & model training
βββ requirements.txt # Dependencies
βββ README.md # Project doc β¦