This Project focuses on predicting the FWI and the burned area of forest fires using Linear Regression and Ridge Regression. It uses Algerian Forest Fire Dataset, which contains meteorological and fire-related features from different areas of North Africa.
# 🌲 Forest Fire Prediction using Machine Learning 🔥
---
## 🚀 Project Overview
Forest fires are one of the most devastating natural disasters, causing significant environmental, economic, and human losses every year.
Early prediction and detection are crucial to minimize these damages. This project aims to **predict forest fire occurrences and Fire Weather Index (FWI)** using historical weather and fire indices from Algeria.
The dataset consists of environmental variables such as temperature, relative humidity, wind speed, rainfall, and fire weather indices like FFMC, DMC, DC, ISI, BUI, and FWI.
---
## 🎯 Objective
1. **Classify Fire Events**: Predict whether a day is prone to a fire (`fire` vs `not fire`).
2. **Predict Fire Weather Index (FWI)**: Quantitative measure of fire risk using environmental features.
3. **Visualize Fire Patterns**: Analyze trends, correlations, and regional fire distributions.
---
## 📊 Dataset
- **Source**: Algerian Forest Fires Dataset (2012)
- **Number of Records**: 243
- **Features**:
| Feature | Description |
|---------|-------------|
| `day` | Day of the month |
| `month` | Month |
| `year` | Year |
| `Temperature` | Daily temperature (°C) |
| `RH` | Relative Humidity (%) |
| `Ws` | Wind speed (km/h) |
| `Rain` | Rainfall (mm/m²) |
| `FFMC` | Fine Fuel Moisture Code |
| `DMC` | Duff Moisture Code |
| `DC` | Drought Code |
| `ISI` | Initial Spread Index |
| `BUI` | Build-Up Index |
| `FWI` | Fire Weather Index (target for regression) |
| `Classes` | Fire occurrence: `fire` / `not fire` |
| `Region` | Region ID (0 = Bejaia, 1 = Sidi-Bel Abbes) |
---
## 🧹 Data Cleaning & Preprocessing
- Removed null and redundant values.
- Standardized column names.
- Converted numerical features to appropriate types.
- Encoded fire labels (`fire` / `not fire`) as 1/0 for classification.
- Removed highly correlated features (`threshold = 0.85`) to reduce multicollinearity.
- Standardized dataset using `StandardScaler` for numerical stability. …