Climate-induced Transformer model for Bangkok MRT station ridership prediction
A deep learning pipeline that forecasts daily passenger in/out counts at individual MRT stations using a Transformer architecture, incorporating climate variables (temperature, rainfall, humidity) alongside historical ridership data.
| Model | Transformer (encoder-only, per-station) |
| Target | Ridership in & out per MRT station |
| Input features | Historical ridership + climate variables |
| Sequence length | 28 days → forecast 1 day ahead |
| Framework | PyTorch (CUDA-ready) |
- Per-station model training with checkpoint saving
- NaN-safe preprocessing and robust normalization options (
standard,minmax,robust) - Evaluation metrics: MAE, RMSE, R²
- Auto-generated prediction plots per station
| File | Description |
|---|---|
Master.csv |
Daily ridership + climate data per station |
static.csv |
Station metadata (line, location, etc.) |
pip install torch pandas numpy matplotlib
python main.pySet MODE = 0 for train + test, MODE = 1 for inference only (loads saved checkpoints).
Part of the Bangkok Living Lab research under CUTI (Chulalongkorn University Transportation Institute), investigating climate resilience of urban transit systems.