# Algerian Forest Fire Prediction
This project uses machine learning to predict the **Fire Weather Index (FWI)** based on meteorological data from two regions in Algeria (Bejaia and Sidi-Bel Abbes).
The project is built in two main parts:
1. **Data Cleaning (`clean.ipynb`):** Loads the raw dataset, performs extensive cleaning, feature engineering, and saves the result.
2. **Model Training (`fire.ipynb`):** Loads the cleaned data, applies scaling, trains a Ridge Regression model, and saves the final model and scaler.
---
## Dataset
The original dataset is the "Algerian Forest Fires Dataset" from the UCI Machine Learning Repository. It contains meteorological data and fire-related indices.
* The **raw dataset** is not included in this repo.
* The **cleaned dataset** (`algerian_cleaned_data.csv`) is provided and is the starting point for the modeling notebook.
---
## đź“‚ Project Structure & File Guide
* `clean.ipynb`: Jupyter Notebook for loading the raw data, performing EDA (Exploratory Data Analysis), cleaning, and feature engineering.
* `fire.ipynb`: Jupyter Notebook for model training. It loads the clean data, splits it, applies `StandardScaler`, and trains a **Ridge Regression** model.
* `algerian_cleaned_data.csv`: The cleaned data, ready for modeling. This is the output of `clean.ipynb`.
* `ridge.pkl`: The final, trained **Ridge Regression model** object.
* `scaler.pkl`: The saved **StandardScaler** object used to transform the features.
* `requirements.txt`: A list of all necessary Python packages.
---
## 🛠️ Tech Stack
* Python
* Pandas
* NumPy
* Scikit-learn (for Ridge Regression, StandardScaler, train_test_split)
* Matplotlib & Seaborn (for visualization)
* Jupyter Notebook