Predict forest fire occurrences using regression on Algerian weather data. Complete ML pipeline with EDA, Ridge Regression, Flask API, and AWS deployment. Built for real-world scalability and clarity.
# Algerian Forest Fires – Regression Analysis Project
This project presents a complete **Machine Learning Regression pipeline** to analyze and predict forest fire behavior using weather and fire index data from Algeria. From **data preprocessing and EDA** to **model training with Ridge Regression** and **deployment readiness via Flask and AWS Elastic Beanstalk**, this solution follows a professional and production-oriented workflow.
---
## 🗂️ Project Directory Structure
├── .ebextensions/ # AWS deployment configs (Elastic Beanstalk)
├── model/
│ ├── ridge.pkl # Serialized Ridge Regression model
│ └── scaler.pkl # StandardScaler object used during training
│
├── NotBooks/
│ ├── raw_dataset/
│ │ └── Raw_Algerian_forest_fires_dataset_UPDATE.csv
│ ├── cleaned_dataset/
│ │ └── Cleaned_Algerian_forest_fires_dataset.csv
│ ├── ridge_EDA_FE.ipynb # Exploratory Data Analysis & Feature Engineering
│ └── ridge_MAIN.ipynb # Model training and evaluation
│
├── application.py # Flask app for inference
---
## 📚 Dataset Overview
- **Source**: UCI ML Repository – Algerian Forest Fires Dataset
- **Context**: This dataset provides weather and fire index data collected from two Algerian regions during June–September.
- **Files Included**:
- Raw_Algerian_forest_fires_dataset_UPDATE.csv – Original dataset
- Cleaned_Algerian_forest_fires_dataset.csv – Cleaned, preprocessed version used for modeling
### 🔑 Features Used
- **Environmental**: Temperature, Relative Humidity (RH), Wind, Rain
- **Fire Weather Indices**: FFMC, DMC, DC, ISI
- **Target**: Classes → encoded to binary: 1 (fire), 0 (not fire)
---
## 🔄 End-to-End Workflow
### 📥 1. Data Loading & Cleaning
- Combined datasets from both regions
- Removed null values and fixed inconsistent entries
- Cleaned labels and standardized formatting
### 📊 2. EDA & Feature Engineering
- **Visualized** distributions, pairplots, and correlation matrices
- **Detected a …