Logo Lanfrica

Riznxz/Forest-Fire-Index-Detection

Domain:

environment and energy

Record type:

software
Creator:
Riz
Host:
A machine learning project that predicts the Fire Weather Index (FWI) for Algerian forests using Ridge Regression, with a Flask web app for real-time predictions. # Algerian Forest Fire Prediction - Model Training & Flask UI ## 📌 Project Overview This project focuses on **predicting fire weather index (FWI)** for Algerian forest regions using **machine learning**. We utilize the **Algerian Forest Fires Dataset** containing meteorological and fire weather parameters, perform **Exploratory Data Analysis (EDA)**, **Feature Engineering (FE)**, train a **Ridge Regression model** ,Built a Flask web application so users can input weather data and get real-time predictions. --- ## 📊 Dataset The dataset contains **daily weather and fire index measurements** from Algeria’s Bejaia and Sidi-Bel Abbes regions. **Key Features:** - Temperature (°C) - Relative Humidity (%) - Wind Speed (km/h) - Rain (mm) - FFMC, DMC, DC, ISI (Fire Weather Index components) - Region & Date - Target Variable: **FWI (Fire Weather Index)** --- ## 🛠 Steps Performed ### 1️⃣ Data Loading - Loaded raw dataset (`Algerian_forest_fires_dataset_UPDATE.csv`). - Inspected shape, data types, and missing values. ### 2️⃣ Data Cleaning - Removed inconsistent entries & handled missing data. - Corrected column names and ensured proper formatting. - Converted date columns to `datetime` type. - Encoded categorical features like region. ### 3️⃣ Exploratory Data Analysis (EDA) - **Statistical Summary**: Mean, median, min, max for all features. - **Visualizations**: - Histograms & boxplots for feature distribution. - Heatmap for feature correlations. - Region-wise comparison of FWI and weather conditions. ### 4️⃣ Feature Engineering - Applied **One-Hot Encoding** for categorical variables. - Standardized numerical features using `StandardScaler`. - Selected important features for model training. ### 5️⃣ Model Training - Chose **Ridge Regression** to handle multicollinearity. - Used `train_test_split` to split data into training & testing sets. - Hyperparameter tuning using `GridSearchCV`. ### 6️⃣ Model Evaluation - Metrics: - **R² Score** - **Mean Absolute Error (MAE)** - …