Data Analysis, creation of cleaned data and then ML model for Algerian Forest fires dataset
# Algerian Forest Fires FWI Prediction
## Overview
This project is a machine learning application designed to predict the Fire Weather Index (FWI) based on meteorological data collected from Algerian forest fires. It has been evolved from a data analysis script into a full-fledged web application using Flask, providing a user-friendly interface for making predictions.
This project analyzes the Algerian Forest Fires dataset to understand fire patterns across different regions and builds machine learning regression models to predict the Fire Weather Index (FWI).
## Dataset
The project uses the Algerian Forest Fires Dataset containing 245 records from two regions in Algeria:
- **Bejaia Region**: 122 records
- **Sidi-Bel Abbes Region**: 122 records
- Data collected from June to September 2012.
### Features
- **Temporal**: day, month, year
- **Weather Variables**: Temperature, Relative Humidity (RH), Wind Speed (Ws), Rain
- **Fire Weather Indices**: FFMC, DMC, DC, ISI, BUI, FWI
- **Target**: Classes (Fire/Not Fire)
## Project Workflow
### 1. Data Cleaning (`Algerian Forest FIres analysis.ipynb`)
- Removed rows with missing values
- Dropped duplicate header rows
- Fixed column name spacing issues
- Type conversion: integers for temporal/basic features, floats for weather indices
- Encoded categorical Classes column (0 = Not Fire, 1 = Fire)
- Output: `Algerian_forest_fires_cleaned_dataset.csv`
### 2. Exploratory Data Analysis (EDA)
- Generated distribution histograms for all features
- Class imbalance analysis: Fire vs Not Fire ratio
- Correlation heatmap to identify feature relationships
- Outlier detection using box plots (FWI shows significant positive skew)
- **Monthly Fire Patterns**:
- *Bejaia*: Peak fire occurrences in August
- *Sidi-Bel Abbes*: Clear summer peaks in July-August
- Both regions show decreased fire activity in September
### 3. Feature Engineering & Preprocessing
- Dropped temporal features (day, month, year)
- Multicollinearity assessment with …