@@ -9,90 +9,31 @@ Yaguang Li, Rose Yu, Cyrus Shahabi, Yan Liu, [Diffusion Convolutional Recurrent
## Requirements
- scipy>=0.19.0
- numpy>=1.12.1
- pandas>=0.19.2
- torch>=0.4.x
- scipy=1.2.1
- numpy=1.16.2
- pandas=0.24.2
- torch>=1.1.0
- tqdm
- pytable
## Data Preparation
The traffic data files for Los Angeles (METR-LA) and the Bay Area (PEMS-BAY), i.e., `metr-la.h5` and `pems-bay.h5`, are available at [Google Drive](https://drive.google.com/open?id=10FOTa6HXPqX8Pf5WRoRwcFnW9BrNZEIX) or [Baidu Yun](https://pan.baidu.com/s/14Yy9isAIZYdU__OYEQGa_g), and should be
put into the `data/` folder.
The `*.h5` files store the data in `panads.DataFrame` using the `HDF5` file format. Here is an example:
Besides, the locations of sensors in Los Angeles, i.e., METR-LA, are available at [data/sensor_graph/graph_sensor_locations.csv](https://github.com/liyaguang/DCRNN/blob/master/data/sensor_graph/graph_sensor_locations.csv).
The generated prediction of DCRNN is in `data/results/dcrnn_predictions`.
For data preparation, check the original repo:[liyaguang/DCRNN](https://github.com/liyaguang/DCRNN)
## Model Training
For now, training is only supported for METR-LA dataset due to data availability.
```bash
# METR-LA
python train_DCRNN.py
python train.py --config config.json
```
Each epoch takes about 2min(~ 130 seconds) on a single RTX 2080 Ti for METR-LA.
Each epoch takes about 5-6min(~ 340 seconds) on a single RTX 2080 Ti for METR-LA.
There is a chance that the training loss will explode, the temporary workaround is to restart from the last saved model before the explosion, or to decrease the learning rate earlier in the learning rate schedule.