It basically predicts the Fire in the two regions of Algerian Forest
# Algerian Forest Fire Predictor
This project provides a complete pipeline for analyzing, modeling, and predicting the Forest Fire Weather Index (FWI) in Algeria using machine learning. It includes data cleaning, exploratory data analysis (EDA), model training, and a web application for real-time prediction.
## Features
- **Data Cleaning & EDA**: Jupyter notebooks for cleaning and exploring the Algerian forest fire dataset.
- **Model Training**: Multiple regression models (Linear, Lasso, Ridge, ElasticNet) with cross-validation and feature engineering.
- **Web Application**: Flask-based web app for predicting FWI from user input.
## Dataset
- `notebooks/Algerian_forest_fires_dataset_UPDATE.csv`: Raw dataset with meteorological and fire occurrence data for two Algerian regions.
- `notebooks/Algerian_forest_fires_dataset_Cleaned.csv`: Cleaned and preprocessed dataset.
## Notebooks
- `notebooks/clean-and-eda.ipynb`: Data cleaning, type fixing, region labeling, visualization, and correlation analysis.
- `notebooks/model-training.ipynb`: Feature selection, scaling, model training (including saving scaler and model as `.pkl`), and evaluation.
## Web Application
- `application.py`: Flask app that loads the trained Ridge regression model and scaler, provides a web interface for FWI prediction.
- `templates/index.html`: Welcome page.
- `templates/home.html`: Input form for prediction and result display.
- `models/ridge_model.pkl`, `models/scaler.pkl`: Saved model and scaler from training notebook.
## Requirements
- Python 3.x
- Flask
- numpy
- pandas
- scikit-learn
Install dependencies with:
```bash
pip install -r requirements.txt
```
## Usage
1. **Data Cleaning & EDA**: Run `notebooks/clean-and-eda.ipynb` to clean and explore the dataset. This generates the cleaned CSV.
2. **Model Training**: Run `notebooks/model-training.ipynb` to train models and export the scaler/model as `.pkl` files.
3. **Web App (Local)**: Start the Flas …