# π₯ Algerian Forest Fire Prediction
An end-to-end Machine Learning web application to predict the **Fire Weather Index (FWI)** using meteorological data from the Algerian Forest Fires dataset.
π **Live Demo:** Click Here
> β οΈ Hosted on Render's free tier β first load may take 50+ seconds to wake up.
---
## π Problem Statement
Forest fires cause massive environmental and economic damage.
This project predicts the **Fire Weather Index (FWI)** based on weather and fire-related features to estimate fire risk levels.
---
## π Features
- Real-time Fire Weather Index (FWI) prediction
- Fire risk classification (Low, Moderate, High, Extreme)
- User-friendly Flask web interface
- Scalable ML pipeline
---
## π§ Machine Learning Pipeline
1. Data preprocessing & cleaning
2. Feature selection
3. Feature scaling using **StandardScaler**
4. Model training using **Ridge Regression**
5. Model serialization using **Pickle**
---
## π οΈ Tech Stack
- **Programming Language:** Python
- **Machine Learning:** Scikit-learn
- **Web Framework:** Flask
- **Frontend:** HTML, CSS
- **Deployment:** Render
- **Version Control:** Git & GitHub
---
## π Project Structure
```
Algerian-Forest-Fire-Prediction/
β
βββ model/ # Jupyter notebooks for EDA & model training
βββ pkl/ # Serialized model and scaler files
β βββ ridge.pkl
β βββ scaler.pkl
βββ templates/ # HTML templates
β βββ home.html
βββ application.py # Flask application
βββ requirements.txt # Python dependencies
βββ README.md
```
---
## π Dataset
- **Source:** UCI Machine Learning Repository - Algerian Forest Fires Dataset
- **Regions:** Bejaia (northeast Algeria) and Sidi Bel-abbes (northwest Algeria)
- **Period:** June to September 2012
### Input Features
| Feature | Description |
|---|---|
| Temperature | Temperature at noon (Β°C) |
| RH | Relative Humidity (%) |
| Ws | Wind Speed (km/h) |
| Rain | Total rainfall (mm) |
| FFMC | Fine Fuel Moisture Code |
| DM β¦