Predict the chance of Forest Fires using some input parameters
# 🌲🔥 Algerian Forest Fire Predictor
A Machine Learning web application built with **Flask** that predicts **Fire Weather Index (FWI)** and **forest fire occurrence (Fire / No Fire)** for Algerian forests using meteorological and vegetation indices. The app uses pre-trained regression and classification models to provide real-time fire risk insights.
---
## 📘 Overview
This project uses the **Algerian Forest Fires Dataset** to model and predict:
- **Fire Weather Index (FWI)** using regularized linear regression models.
- **Fire Occurrence (Fire / No Fire)** using logistic regression classifiers.
Users provide meteorological inputs through a web interface, and the application returns both the predicted FWI value and the likelihood of a forest fire.
---
## 🚀 Features
### 🔥 Fire Risk Prediction (Classification)
Predicts whether there is a **risk of forest fire** using Logistic Regression-based models.
- GridSearchCV-optimized Logistic Regression
- RandomizedSearchCV-optimized Logistic Regression
These models classify the input as **Fire** or **No Fire**, based on learned decision boundaries from the dataset.
### 📈 FWI Prediction (Regression)
Predicts the **Fire Weather Index (FWI)**, an indicator of potential fire intensity.
Models used with cross-validated hyperparameter tuning:
- **Ridge Regression** (L2 regularization)
- **Lasso Regression** (L1 regularization)
- **ElasticNet Regression** (combined L1 + L2)
Each model is trained on scaled features and saved as a `.pkl` file for fast inference.
### 🖥️ Web Application
- Built using **Flask**
- User-friendly **HTML + CSS** interface
- Takes meteorological inputs from an HTML form
- Uses serialized `.pkl` models for live predictions
- Displays:
- Fire risk: **Fire / No Fire**
- Predicted **FWI** value
---
## 🧠 Machine Learning Models
### 🔷 FWI Regression Models
| Model | Technique | Notes |
|--------------------|-------------------|--------------------------- …