Algerian-forest-FWI-prediction
# Forest Fire Weather Index (FWI) Prediction
A machine learning web application that predicts the **Fire Weather Index (FWI)** — a composite score indicating how readily a fire could ignite and spread — using real-time weather and fuel-moisture readings. Built with a regression model trained on the **Algerian Forest Fires Dataset** and served through a Flask web interface.
---
## Overview
Forest fires are strongly influenced by weather conditions and fuel dryness. The **Canadian Forest Fire Weather Index (FWI) System** combines several sub-indices — each capturing a different aspect of fire danger — into scores that fire management agencies use to anticipate risk. This project trains a regression model to predict the final FWI score directly from raw weather observations and intermediate FWI components, then exposes the model through a simple web form.
## Dataset
**Source:** Algerian Forest Fires Dataset
The dataset contains **244 instances** covering two regions of Algeria over the period **June 2012 to September 2012**:
| Region | Location | Instances |
|---|---|---|
| Bejaia | Northeast Algeria | 122 |
| Sidi Bel-abbes | Northwest Algeria | 122 |
Of the 244 total instances, **138 are classified as Fire** and **106 as Not Fire**.
### Attributes
| # | Attribute | Description | Range |
|---|---|---|---|
| 1 | Date | Day, month (June–September), year (2012) | — |
| 2 | Temperature | Noon temperature (max) in °C | 22 – 42 |
| 3 | RH | Relative Humidity (%) | 21 – 90 |
| 4 | Ws | Wind speed (km/h) | 6 – 29 |
| 5 | Rain | Total rainfall for the day (mm) | 0 – 16.8 |
| 6 | FFMC | Fine Fuel Moisture Code | 28.6 – 92.5 |
| 7 | DMC | Duff Moisture Code | 1.1 – 65.9 |
| 8 | DC | Drought Code | 7 – 220.4 |
| 9 | ISI | Initial Spread Index | 0 – 18.5 |
| 10 | BUI | Buildup Index | 1.1 – 68 |
| 11 | FWI | Fire Weather Index *(target for regression)* | 0 – 31.1 |
| 12 | Classes | Fire / Not Fire | binary |
**Encoding used in this app:**
- `Classes` → `0 = Not Fire`, …