Flask web app predicting Forest Weather Index (FWI) using the Algerian Forest Fires dataset
# π₯ Forest Fire Weather Index (FWI) Predictor
A machine learning web application that predicts the **Fire Weather Index (FWI)** β a numeric indicator of wildfire risk β from meteorological inputs, with an interactive Flask front-end.
---
## π What is FWI?
The **Fire Weather Index (FWI)** is a globally recognized system for rating fire intensity based on daily weather conditions. It is used by forest fire management agencies to assess danger levels and deploy resources proactively.
This project trains and deploys a regression model on the Algerian Forest Fires Dataset (UCI) to predict FWI scores from user-provided weather inputs.
---
## β¨ Features
- π‘οΈ Predict FWI from 9 weather parameters (temperature, humidity, wind, rain, etc.)
- π Clean web UI built with Flask and HTML/CSS
- π Compared multiple regression models β Ridge Regression selected for deployment
- π EDA and feature engineering in Jupyter Notebooks
- π§ͺ StandardScaler used for feature normalization
- π§ Trained model serialized with `pickle` for fast inference
---
## π οΈ Tech Stack
| Category | Tools |
|---|---|
| Language | Python 3.8+ |
| Web Framework | Flask |
| ML Library | Scikit-learn |
| Data Processing | Pandas, NumPy |
| Visualization | Matplotlib, Seaborn |
| Notebooks | Jupyter |
| Model Serialization | Pickle |
---
## π Project Structure
```
flask-fwi-prediction/
β
βββ notebooks/
β βββ EDA_and_Model_Training.ipynb # Exploratory analysis + model comparison
β
βββ templates/
β βββ index.html # Input form
β βββ result.html # Prediction output page
β
βββ static/
β βββ style.css # Styling
β
βββ app.py # Flask application entry point
βββ ridge_model.pkl # Trained Ridge Regression model
βββ scaler.pkl # Fitted StandardScaler
βββ requirements.txt
βββ README.md
```
---
## π Dataset
**Algerian Forest Fires Dataset** β UCI ML Repository
- **244 instance β¦