# Algerian Forest Fire Prediction
This project focuses on predicting the occurrence of forest fires in Algeria using machine learning models. The workflow includes exploratory data analysis, feature engineering, model training, and deployment with Flask.
Project Overview
The project uses the Algerian Forest Fires dataset. Several preprocessing and modeling steps were applied to build a reliable prediction system. The final model was saved as a pickle file and integrated into a Flask application for real-time predictions.
Steps Performed
1. Exploratory Data Analysis (EDA)
Analyzed the dataset to understand distributions, missing values, and correlations.
Cleaned and prepared the data for modeling.
Applied feature engineering to create meaningful input features.
2. Data Preprocessing
Standardized the input features using StandardScaler to normalize the data.
Ensured that the transformed data was ready for regression-based models.
3. Models Applied
Linear Regression
Ridge Regression
Lasso Regression
Elastic Net Regression
4. Cross-Validation
Used cross-validated versions of models for better generalization:
RidgeCV
LassoCV
ElasticNetCV
5. Model Selection
After evaluation, Ridge Regression was selected as the final model.
The trained Ridge model and the fitted StandardScaler were saved as pickle files (rid.pkl and scaler.pkl).
6. Deployment
Built a Flask application to serve predictions.
The app loads the trained Ridge model and StandardScaler from pickle files.
A user-friendly web form (index.html) allows users to input environmental parameters such as Temperature, RH, Ws, Rain, FFMC, DMC, ISI, Classes, and Region to get fire risk predictions.
## How to Run
Clone the repository.
..... Install dependencies from requirements.txt:
pip install -r requirements.txt
## Run the Flask application:
python application.py
## Open the browser and go to:
127.0.0.1
127.0.0.1