This project predicts the Fire Weather Index (FWI), a numerical indicator of fire risk using meteorological and environmental parameters from the Algerian Forest Fires Dataset.
# Algerian Forest Fire Weather Index Prediction
## Overview
This project predicts the **Fire Weather Index (FWI)** — a numerical indicator of fire risk — using meteorological and environmental parameters from the **Algerian Forest Fires Dataset**.
The project includes:
- **Exploratory Data Analysis (EDA) and Feature Engineering**
- **Model Training and Evaluation**
- A **Flask Web Application** for live predictions
- Deployment on **AWS Elastic Beanstalk**
---
## Dataset
**Dataset name:** Algerian Forest Fires Dataset
**Source:** UCI Machine Learning Repository
The dataset includes **244 samples** collected from two Algerian regions — **Bejaia** and **Sidi Bel-Abbès** — between **June and September 2012**.
| Feature | Description |
|----------|--------------|
| Temp | Temperature (°C) |
| RH | Relative Humidity (%) |
| Ws | Wind Speed (km/h) |
| Rain | Rainfall (mm) |
| FFMC | Fine Fuel Moisture Code |
| DMC | Duff Moisture Code |
| DC | Drought Code |
| ISI | Initial Spread Index |
| BUI | Buildup Index |
| FWI | Fire Weather Index (Target Variable) |
---
## Project Workflow
### 1. **Data Preprocessing and EDA**
- Cleaned missing and inconsistent data
- Merged regional datasets
- Encoded categorical features
- Visualized correlations using heatmaps and pairplots
- Removed multicollinear features
### 2. **Model Training**
- Split data: 75% training / 25% testing
- Applied scaling and normalization
- Trained multiple regression models (e.g., Linear Regression, Random Forest, Ridge, Lasso)
- Evaluated using metrics: **R², MAE, RMSE**
### 3. **Model Selection and Serialization**
- Chose the best model (highest R² on test data)
- Serialized model using `pickle` for Flask integration
### 4. **Flask Web App**
- Flask web interface to input weather parameters
- Model predicts **FWI value**
- Displays result dynamically on the same page
---
## Tech Stack
| Component | Technology |
|------------|-------------|
| Language | Python 3.x |
| Framework | Flask |
| Da …