Logo Lanfrica

ishityadav/Algerian-forest-fire

Domain:

environment and energy

Record type:

software
Creator:
ish
Host:
# πŸ”₯ Algerian Forest Fire β€” FWI Prediction A Flask web application that predicts the **Fire Weather Index (FWI)** using a Ridge regression model trained on the Algerian Forest Fires dataset. **πŸ”— Live app:** algerian-forest-fire-urz8.o… --- ## Overview This project builds a regression model that estimates the **Fire Weather Index (FWI)** β€” a numeric indicator of forest fire risk β€” from weather and fire-behavior-index readings, and serves it through a small Flask web app. The underlying data is the **Algerian Forest Fires dataset**, which contains observations from two regions of Algeria (Bejaia and Sidi Bel-Abbes) collected over the summer of 2012. ## How it works 1. **Data cleaning** (`notebooks/Untitled copy.ipynb`) - Raw CSV (`Algerian_forest_fires_dataset_UPDATE.csv`) is loaded, with the two regions originally stacked in one file separated by a header row. - A `Region` column is added (0 = Bejaia, 1 = Sidi Bel-Abbes) based on row position. - Null rows and a stray header row embedded mid-file are dropped. - Column names are stripped of whitespace, and numeric columns (`day`, `month`, `year`, `Temperature`, `RH`, `Ws`, and the fire indices) are cast to proper numeric types. - The `Classes` label (fire / not fire) is cleaned (trimmed, lowercased) for consistency. - The cleaned data is exported to `Algerian_cleaned.csv`. 2. **Exploratory data analysis** - Correlation heatmaps to inspect relationships between weather variables and FWI. - Boxplots to check outliers across all numeric features. - Fire-count breakdowns by month for each region. 3. **Feature selection** - A multicollinearity check drops features with pairwise correlation above 0.85 (this removes `DC` and `BUI`, which are highly correlated with other fire indices). - Remaining features used to predict `FWI`: **Temperature, RH (relative humidity), Ws (wind speed), Rain, FFMC, DMC, ISI, Classes, Region**. 4. **Modeling** - Features are standardized with `StandardScaler`. - Several …