How manpreet-singh-aiml/aqi-jalandhar works
FedLSTM-AQI is a command-line research pipeline for preparing Jalandhar air-quality data, computing CPCB-standard AQI labels, and training/evaluating centralized and federated forecasting models. The main path is raw CPCB data through preprocessing and AQI labeling to LSTM or BiLSTM forecasts; federated training additionally uses CPCB and heterogeneous Airveda client data, Paillier-protected output-layer weights, and sample-proportional FedAvg. Source excerpts show the federated orchestration and model details; the README documents the script-level pipeline and capabilities.
Main entry points: federated_approach.py Local training · bilstm_training.py Sensor validation · preprocess.py Preprocess data · compute_aqi.py Compute AQI
Components 17
Data Preparation
- Preprocess data
preprocess.py - Filled dataset
- Compute AQI
compute_aqi.py - AQI dataset
Centralized Models
- LSTM baseline
lstm_training.py - BiLSTM attention
bilstm_training.py
Federated Learning
- Three FL clients
federated_approach.py - LSTM and BiLSTM
federated_approach.py - Local training
federated_approach.py - Paillier protection
federated_approach.py - FedAvg aggregation
federated_approach.py - Global models
federated_approach.py
Evaluation
- Sensor validation
bilstm_training.py - Forecast metrics
federated_approach.py
Other components
- CPCB data
- Airveda sensors
- AQI forecasts
Connections 19
- CPCB data → Preprocess data: loads raw data
README.md - Preprocess data → Filled dataset: writes filled data
README.md - Filled dataset → Compute AQI: loads filled data
compute_aqi.py - Compute AQI → AQI dataset: writes AQI labels
compute_aqi.py - AQI dataset → LSTM baseline: trains baseline
lstm_training.py - AQI dataset → BiLSTM attention: trains baseline
bilstm_training.py - AQI dataset → Three FL clients: loads CPCB data
federated_approach.py - Airveda sensors → Three FL clients: loads client data
federated_approach.py - Three FL clients → Local training: provides client samples
federated_approach.py - LSTM and BiLSTM → Local training: creates local models
federated_approach.py - Local training → Paillier protection: encrypts Dense weights
federated_approach.py - Local training → FedAvg aggregation: supplies local weights
federated_approach.py - Paillier protection → FedAvg aggregation: protects sampled weights
federated_approach.py - FedAvg aggregation → Global models: updates global weights
federated_approach.py - Global models → Forecast metrics: evaluates predictions
federated_approach.py - LSTM baseline → Sensor validation: validates on sensors
lstm_training.py - BiLSTM attention → Sensor validation: validates on sensors
bilstm_training.py - Sensor validation → AQI forecasts: produces predictions
README.md - Forecast metrics → AQI forecasts: reports forecast results
README.md