# 🔥 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 …