End-to-end ML pipeline for predicting the Algerian Forest Fire Weather Index (FWI) — from raw dataset cleaning and EDA, through feature engineering and Ridge Regression model training (R² ≈ 0.98), to a Flask + Tailwind CSS web app deployed on AWS Elastic Beanstalk via an automated CodePipeline CI/CD flow.
# 🔥 Forest Fire Prediction (FWI) System
An end-to-end Machine Learning web application that predicts the **Fire Weather Index (FWI)** using meteorological and environmental data. The model is trained on the Algerian Forest Fires dataset and deployed via an automated AWS CI/CD pipeline.
**🔴 Live Demo: View the Application Here**
---
## 📸 Dashboard Interface
*A glassmorphic UI built with Tailwind CSS, responsive across devices.*
---
## 📊 ML Pipeline: Dataset → Deployment
This is the full lifecycle of the project — from raw CSV to a live prediction served in the browser.
```mermaid
flowchart TD
A["📂 Raw Dataset Algerian_forest_fires_dataset_UPDATE.csv"] --> B["🧹 Data Cleaning fix headers, drop nulls, add Region column"]
B --> C["📈 EDA correlation heatmap, distributions, monthly fire trends"]
C --> D["💾 Cleaned Dataset Algerian_forest_fires_cleaned_dataset.csv"]
D --> E["🛠️ Feature Engineering drop day/month/year, encode Classes, drop BUI & DC (corr > 0.85)"]
E --> F["✂️ Train/Test Split 75/25, random_state=42"]
F --> G["📏 Feature Scaling StandardScaler"]
G --> H["🤖 Model Training & Comparison Linear, Lasso, Ridge, ElasticNet + CV variants"]
H --> I["🏆 Best Model Selected Ridge Regression, R² ≈ 0.984"]
I --> J["📦 Serialized Artifacts ridge.pkl + scaler.pkl"]
J --> K["🌐 Flask Backend application.py"]
K --> L["🎨 Tailwind Frontend home.html"]
L --> M["☁️ AWS Elastic Beanstalk Deployment"]
M --> N["🔴 Live FWI Prediction App"]
```
---
## ⚙️ CI/CD Deployment Flow
Any push to `main` automatically triggers a new deployment via AWS CodePipeline.
```mermaid
graph TD
A[👨💻 Developer Push] -->|git push| B(📂 GitHub Repository)
B -->|Webhook Trigger| C{⚙️ AWS CodePipeline}
subgraph CI/CD Pipeline
C -->|Pull Source Code| D[📦 Source Stage]
D -->|Package Code| E[🚀 Deploy Stage]
end
E -->|Update Environment| F((☁️ AWS Elastic Beanstalk))
F -->|Serve via Gunicorn| G[🌐 Live Flask App]
```
---
## 🛠️ Technology Stack
* **Machine Learning:** Scikit-Learn, Pandas, NumP …