Machine learning project using classification, regression, clustering, and SHAP explainability on the Algerian Forest Fires dataset. Models fire occurrence and Fire Weather Index (FWI) to support proactive wildfire management.
# 🌲 Forest Fire Prediction and Analysis using Machine Learning
This project applies classification, regression, clustering, and explainable AI techniques to the **Algerian Forest Fires Dataset** to understand and predict fire occurrences and fire weather conditions.
---
## 🔍 Project Highlights
- ✅ **Binary Classification**: Predicts if a fire occurred (`fire` vs `not fire`)
- 📈 **Regression Modeling**: Predicts **Fire Weather Index (FWI)**
- 🧠 **Clustering**: Groups data using KMeans and Agglomerative Clustering
- 📊 **Explainability**: Uses SHAP for feature importance visualization
- 🔄 **Data Standardization**: Applies `StandardScaler` for uniform feature scaling
---
## 💻 Models Used
### 🧪 Classification
- Logistic Regression
- Random Forest Classifier
- Support Vector Machine (SVC)
### 📊 Regression
- Linear Regression
- Random Forest Regressor
- Gradient Boosting Regressor
### 🤖 Clustering
- KMeans
- Agglomerative Clustering
---
## 📦 Dependencies
Install all requirements using:
```bash
pip install -r requirements.txt
```
---
## 📁 Dataset
- **Source**: UCI Algerian Forest Fires Dataset
Place the cleaned dataset as:
```
forest-fire-ml/
├── Algerian_forest_fires_dataset_CLEANED.csv
```
---
## 🚀 How to Run
```bash
python forest_fire_analysis.py
```
---
## 📈 Visualizations
- PCA-reduced clustering visualizations
- SHAP summary plots for feature importance
- Bar plots for Random Forest feature importances
---
## 🧠 Author
- **USMAN** – AI & ML Enthusiast | GitHub: [Usman361-AI]
---
## 📜 License
This project is licensed under the MIT License - see the LICENSE file for details.