AQI Eco-Nav Models
Machine learning and deep learning models for Air Quality Index (AQI) prediction using air-quality and temporal features.
This repository contains two independently trained models:
- XGBoost β traditional machine learning model for tabular AQI prediction
- BiLSTM β deep learning model for time-series AQI prediction
Both models were trained using air-quality data from India.
Models
1. XGBoost β Machine Learning
Model: XGBoost Regressor
Task: AQI regression
Model file:
ml/xgb_aqi_model.pkl
Performance
| Metric | Score |
|---|---|
| MAE | 20.28 |
| RMSE | 41.14 |
| RΒ² | 0.9076 |
Training samples: 19,880
Test samples: 4,970
Preprocessing
ml/
βββ xgb_aqi_model.pkl
βββ city_encoder.pkl
βββ feature_medians.pkl
βββ model_meta.json
2. BiLSTM β Deep Learning
Model: 2-layer Bidirectional LSTM
Framework: PyTorch
Task: Time-series AQI regression
Architecture:
2ΓBiLSTM(hidden=128, bidirectional=True)
β
FC(256)
β
AQI Output
Sequence length: 7
Model file:
dl/lstm_aqi_model.pt
Performance
| Metric | Score |
|---|---|
| MAE | 17.21 |
| RMSE | 25.39 |
| RΒ² | 0.8102 |
Training samples: 19,734
Test samples: 2,468
Preprocessing
dl/
βββ lstm_aqi_model.pt
βββ dl_scaler.pkl
βββ dl_city_encoder.pkl
βββ dl_feature_medians.pkl
βββ dl_model_meta.json
Model Comparison
| Model | Type | MAE | RMSE | RΒ² |
|---|---|---|---|---|
| XGBoost | Machine Learning | 20.28 | 41.14 | 0.9076 |
| BiLSTM | Deep Learning | 17.21 | 25.39 | 0.8102 |
The BiLSTM achieves lower MAE and RMSE, while the XGBoost model achieves a higher RΒ² on its respective test evaluation.
Because the models use different evaluation setups, the metrics should not be interpreted as a direct apples-to-apples benchmark.
Input Features
Both models use the following 16 features:
PM2.5
PM10
NO
NO2
NOx
NH3
CO
SO2
O3
Benzene
Toluene
Xylene
Month
DayOfYear
DayOfWeek
City_Enc
Supported Cities
The models were trained using data from these cities:
Ahmedabad
Aizawl
Amaravati
Amritsar
Bengaluru
Bhopal
Brajrajnagar
Chandigarh
Chennai
Coimbatore
Delhi
Ernakulam
Gurugram
Guwahati
Hyderabad
Jaipur
Jorapokhar
Kochi
Kolkata
Lucknow
Mumbai
Patna
Shillong
Talcher
Thiruvananthapuram
Visakhapatnam
Dataset
The models were trained using air-quality data from India.
Dataset source:
https://www.kaggle.com/datasets/rohanrao/air-quality-data-in-india
Model Files
aqi-eco-nav-models/
β
βββ ml/
β βββ xgb_aqi_model.pkl
β βββ city_encoder.pkl
β βββ feature_medians.pkl
β βββ model_meta.json
β
βββ dl/
βββ lstm_aqi_model.pt
βββ dl_scaler.pkl
βββ dl_city_encoder.pkl
βββ dl_feature_medians.pkl
βββ dl_model_meta.json
Technologies
Machine Learning
- Python
- XGBoost
- Scikit-learn
- Pandas
- NumPy
- Joblib
Deep Learning
- Python
- PyTorch
- Bidirectional LSTM
- Scikit-learn
- NumPy
Intended Use
These models are designed for:
- AQI prediction
- Air-quality analysis
- Environmental monitoring
- Machine learning research
- Time-series forecasting experiments
- Educational projects
Disclaimer
These models are intended for educational and research purposes. Predictions may vary when applied to real-world air-quality conditions outside the training data.