Logo Lanfrica

iqrarmalik/Test-Forest-Fire-

Domain:

environment and energy

Record type:

software
Creator:
iqr
Host:
Machine Learning-powered Flask web app that predicts Fire Weather Index (FWI) from Algerian forest fire weather data using a trained Ridge Regression model. # Fire Weather Index Prediction Web App A Machine Learning-powered Flask web application that predicts Fire Weather Index (FWI) using weather and fuel-condition inputs from the Algerian forest fire dataset. ## Project Overview This project includes: - Data cleaning and exploration notebooks - Model training and evaluation for multiple linear models - Exported scaler and trained Ridge Regression model artifacts - A Flask web interface for real-time inference ## Features - Predicts FWI from 9 input features: - Temperature - RH (Relative Humidity) - Ws (Wind Speed) - Rain - FFMC - DMC - ISI - Classes - Region - Trained model served through a clean Flask UI - Portable model loading and artifact paths for deployment ## Tech Stack - Python - Flask - NumPy - Pandas - Scikit-learn - Matplotlib ## Repository Structure - application.py: Flask application entry point - requirements.txt: Python dependencies - models/: Serialized ML artifacts used at inference time - ridge.pkl - scaler.pkl - templates/: HTML templates for UI - index.html - home.html - model Training.ipynb: Model training and export notebook - EDA of Dataset.ipynb: Exploratory data analysis notebook - Algerian_forest_fires_cleaned_dataset.csv: Clean training dataset ## Getting Started ### 1. Clone the repository git clone cd mllab ### 2. Create and activate a virtual environment Windows (PowerShell): python -m venv .venv .\.venv\Scripts\Activate.ps1 ### 3. Install dependencies pip install -r requirements.txt ### 4. Run the Flask app python application.py ### 5. Open in browser 127.0.0.1 ## Model Training Notes The training workflow is documented in model Training.ipynb. The notebook: - Preprocesses data - Splits train/test sets - Scales features - Trains and evaluates Linear, Lasso, Ridge, and ElasticNet models - Exports final artifacts to models/ridge.pkl and models/scaler.pkl ## Deployment Notes - Keep models/ridge.pkl and models/scaler.pkl in the repository (or in your depl …