# π₯ Algerian Forest Fire FWI Predictor
This project is a **web-based machine learning application** that predicts the **Fire Weather Index (FWI)** using **Ridge Regression**. It is trained on the Algerian Forest Fires dataset and deployed using **Flask** as a lightweight backend.
---
## π Project Summary
Forest fires pose a significant environmental threat, and the **Fire Weather Index (FWI)** helps assess fire risk based on weather and environmental conditions. This project:
- Applies Ridge Regression to predict the FWI
- Uses environmental variables such as temperature, humidity, wind speed, etc.
- Provides an interactive web interface for input and real-time prediction
---
## π§ Machine Learning Model
- **Algorithm**: Ridge Regression (Linear Regression with L2 regularization)
- **Features Used**:
- Temperature
- RH (Relative Humidity)
- Wind Speed
- Rain
- FFMC, DMC, ISI (Fire danger indices)
- Classes (Fire occurrence)
- Region (encoded numerically)
- **Preprocessing**: Standard scaling using `StandardScaler`
- **Evaluation Metrics**: RMSE, MAE, RΒ² (covered in notebooks)
---
## π Web App Functionality
Built using **Flask**, the app provides:
- An input form for users to enter weather and fire index parameters
- Backend logic that loads the trained Ridge Regression model and scaler
- Prediction output displayed on a rendered HTML template
**Endpoints:**
- `/` β Entry point to the form
- `/predictdata` β POST route for form submission and prediction
---
## π Repository Structure
```
βββ application.py # Flask application
βββ templates/
β βββ index.html # Input form
β βββ home.html # Prediction result display
βββ models/
β βββ ridge.pkl # Trained Ridge Regression model
β βββ scaler.pkl # StandardScaler used in preprocessing
βββ requirements.txt # Project dependenc β¦