# Algerian Forest Fires FWI Prediction App
This web application predicts the Forest Fire Weather Index (FWI) for Algerian forests using environmental parameters. It is built with Flask and uses a machine learning pipeline (feature scaling, feature selection, and Lasso regression) to provide accurate FWI predictions.
---
## Table of Contents
- Features
- How It Works
- How to Build the Model
- Setup Instructions
- File Structure
- Environmental Parameters
- Intended Users
- License
---
## Features
- **User-friendly web interface** for entering environmental data.
- **Machine Learning Model**: Linear Regression with Exhaustive Feature Selection (EFS) and Lasso Regression.
- **Responsive and mobile-friendly design**.
- **Instant FWI prediction** for fire risk assessment and early warning.
- **Educational and research tool** for environmental scientists and students.
---
## How It Works
1. **Input**: User enters environmental parameters (Temperature, Relative Humidity, Wind Speed, Rainfall, FFMC, DMC, ISI, Classes, Region).
2. **Processing**: Data is scaled and the best features are selected using EFS.
3. **Prediction**: The Lasso regression model predicts the FWI.
4. **Output**: The predicted FWI is displayed on the page.
---
## How to Build the Model
To reproduce or improve the model, follow these steps:
1. **Data Collection**
- Download the Algerian Forest Fires dataset (e.g., from UCI Machine Learning Repository.
- Combine and clean the data as needed.
2. **Data Preprocessing**
- Handle missing values and outliers.
- Encode categorical variables (e.g., Classes, Region) if necessary.
- Split the data into features (X) and target (FWI).
3. **Feature Scaling**
- Use `StandardScaler` from scikit-learn to scale the features.
- Save the scaler using `pickle` for later use in the app.
4. **Feature Selection**
- Apply Exhaustive Feature Selection (EFS) to select the most relevant features.
- You can use `mlxtend`'s `ExhaustiveFeatureSelector` or similar t …