# π₯ Algerian Forest Fire Prediction
This project predicts the **Fire Weather Index (FWI)** using meteorological and fire behavior indicators from the Algerian Forest dataset. A **Linear Regression model** (with Ridge and Lasso regularization) was trained after extensive feature engineering and EDA. A **web interface** built with **Flask** allows users to input conditions and receive real-time FWI predictions.
---
## π Project Overview
- **Objective**: Predict the Fire Weather Index (FWI) based on weather and environmental features.
- **Target Variable**: FWI
- **Tech Stack**:
- Python (Pandas, Scikit-learn, Matplotlib, Seaborn)
- Linear Regression (Ridge and Lasso)
- Flask for web deployment
- HTML/CSS for the frontend
---
## π Feature Engineering and EDA
Before training the model, a thorough **Exploratory Data Analysis (EDA)** and **feature engineering** process was performed:
1. **Data Cleaning**:
- Removed duplicate rows.
- Handled missing values by imputation or deletion based on relevance.
2. **Correlation Analysis**:
- Calculated the correlation matrix to identify highly correlated features.
- Dropped highly correlated variables to reduce multicollinearity and improve model performance.
3. **Feature Selection**:
- Retained only relevant features with good predictive power for FWI.
---
## π€ Model Building
- **Algorithms Used**:
- Ridge Regression
- Lasso Regression
- **Process**:
- Standardized input features.
- Trained models and evaluated performance using appropriate metrics.
- Saved the best-performing model using `pickle` for easy deployment.
---
## π Web Interface with Flask
A user-friendly **web page** allows users to input environmental parameters such as temperature, humidity, wind speed, and fire behavior indices.
- The input is sent to the Flask backend.
- The backend loads the **trained model from the pickle file**.
- The FWI prediction is displayed on the webpage in real-time.
> Example inputs:
> Temperature, Relative Humidity, W β¦