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.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Space using Ganesh-Nadkarni/aqi-eco-nav-models 1