Upload 3 files
Browse files- README.md +53 -0
- aqi_model_4features.pkl +3 -0
- requirements.txt +6 -0
README.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# 🌍 Air Quality Index (AQI) Predictor
|
| 2 |
+
|
| 3 |
+
This project predicts the Air Quality Index (AQI) from pollutant concentrations using a Random Forest Regression model. It demonstrates the complete machine learning pipeline, including data preprocessing, exploratory data analysis, feature engineering, model training, evaluation, and deployment using Flask. Users can input pollutant concentrations to receive a predicted AQI, air quality category, and health advisory.
|
| 4 |
+
|
| 5 |
+
## Features
|
| 6 |
+
- Machine Learning–based AQI Prediction (Random Forest Regression)
|
| 7 |
+
- Data Preprocessing & Exploratory Data Analysis
|
| 8 |
+
- Feature Importance Analysis
|
| 9 |
+
- AQI Category Classification
|
| 10 |
+
- Personalized Health Advisory
|
| 11 |
+
- Interactive Flask Web Application
|
| 12 |
+
- Trained Model Serialization (.pkl)
|
| 13 |
+
|
| 14 |
+
## Live Demo
|
| 15 |
+
- https://aqipredictor-production-c30c.up.railway.app/
|
| 16 |
+
## Tech Stack
|
| 17 |
+
- Python
|
| 18 |
+
- Flask
|
| 19 |
+
- Scikit-Learn
|
| 20 |
+
- Pandas
|
| 21 |
+
- NumPy
|
| 22 |
+
- HTML
|
| 23 |
+
- CSS
|
| 24 |
+
- JavaScript
|
| 25 |
+
|
| 26 |
+
## Model Performance
|
| 27 |
+
- Algorithm: Random Forest Regressor
|
| 28 |
+
- R² Score: 0.892
|
| 29 |
+
- Accuracy: 89.2%
|
| 30 |
+
- MAE: 21.57
|
| 31 |
+
- RMSE: 42.35
|
| 32 |
+
|
| 33 |
+
## Input Features
|
| 34 |
+
- PM2.5
|
| 35 |
+
- PM10
|
| 36 |
+
- CO
|
| 37 |
+
- NO
|
| 38 |
+
|
| 39 |
+
## AQI Categories
|
| 40 |
+
| AQI Range | Category |
|
| 41 |
+
|------------|------------|
|
| 42 |
+
| 0-50 | Good |
|
| 43 |
+
| 51-100 | Satisfactory |
|
| 44 |
+
| 101-200 | Moderate |
|
| 45 |
+
| 201-300 | Poor |
|
| 46 |
+
| 301-400 | Very Poor |
|
| 47 |
+
| 401+ | Severe |
|
| 48 |
+
|
| 49 |
+
## Installation
|
| 50 |
+
|
| 51 |
+
```bash
|
| 52 |
+
pip install -r requirements.txt
|
| 53 |
+
python app.py
|
aqi_model_4features.pkl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2a83cd8f5c19f0b8368aadcc204bb45d6a8c4a58e0f4632a8e122ccb797b4d79
|
| 3 |
+
size 44349505
|
requirements.txt
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
flask==3.1.3
|
| 2 |
+
gunicorn==23.0.0
|
| 3 |
+
numpy
|
| 4 |
+
pandas
|
| 5 |
+
scikit-learn
|
| 6 |
+
joblib
|