Logo Lanfrica

Codewithsayanjib/Algerian-Forest-Fire-Predictor

Domain:

environment and energy

Record type:

software
Creator:
Cod
Host:
# πŸ”₯ Algerian Forest Fire Predictor > Predict forest fire risk in Algerian regions using machine learning and meteorological data. > Built with regression models, Flask, and deployed on Render. --- ## πŸ“Š Dataset The dataset is sourced from Kaggle and includes meteorological data from two Algerian regions relevant to forest fire prediction. **Included files:** - `Algerian_forest_fires_dataset_UPDATE.csv` – raw dataset - `Algerian_forest_fires_cleaned_dataset.csv` – cleaned and preprocessed version --- ## πŸ§ͺ Feature Engineering Preprocessing and transformation steps are documented in the notebook: πŸ“˜ `Algerian forest - Ridge, Lasso Regression(1).ipynb`.ipynb) **Key steps:** - Removal of missing or incorrect values - Encoding categorical variables (e.g., `Region`) - Feature correlation analysis and dimensionality reduction - Input scaling using `StandardScaler` --- ## 🧠 Model Training The following regression models were trained and evaluated: - Linear Regression - Lasso Regression - Ridge Regression βœ… - ElasticNet Regression πŸ“Œ **Final Model**: Ridge Regression πŸ“ˆ **RΒ² Score**: 98.4% (via cross-validation) --- ## πŸ’Ύ Model Artifacts - `ridgecv.pkl` – Trained Ridge Regression model - `scaler.pkl` – Fitted `StandardScaler` for preprocessing --- ## 🌐 Flask Web App A lightweight web application built using Flask to make real-time predictions from user input. **File structure:** ``` application.py ← Flask backend script index.html ← User input form (served directly) ridgecv.pkl ← Trained model scaler.pkl ← Scaler for input normalization requirements.txt ← Python dependencies ```` ### ▢️ Run Locally ```bash pip install -r requirements.txt python application.py ```` Then open your browser and go to: 127.0.0.1 --- ## πŸš€ Deployment The app is deployed using Render. πŸ”— **Live App**: algerian-forest-fire-predic… --- ## πŸ‘¨β€πŸ’» Author Created by **Sayanjib Sur** As pa …