The official implementation of “An Experimental Evaluation of Imputation Models for Spatial-Temporal Traffic Data”
We used 3 traffic datasets and 20 missing scenarios(4 missing types and 5 missing rates) to evaluate each imputation model.
Missing rates including 10%, 30%, 50%, 70%, 90%
We have summaries of existing imputation models from 2018-2024.
Run the following command to construct the corresponding missing scenario from the raw data.
cd GenerateData
python generator.py --config xxx.conf --missrate 0.3 --misstype SR-TRThe conf file is configured with the save path, the raw data path, and a csv file containing the node adjacencies (distances).
Two files will be generated:
- miss_data_{misstype}_{missrate}_v2.npz
- true_data_{misstype}_{missrate}_v2.npz
Usage
#e.g. miss_datapath = miss_data_{SR-TR}_{0.9}_v2.npz
#e.g. true_datapath = true_data_{SR-TR}_{0.9}_v2.npz
miss = np.load(miss_datapath)
mask = miss['mask'] # mask matrix (T,N,F), 0 means missing
miss_data = miss['data'] # 0 means missing (T,N,F)
true_data = np.load(true_datapath)['data'] # ground-truth (T,N,F)You can skip the data generation stage by wrapping the data in the above form.
cd AGCRN/model
python Run.py --config ./configurations/PEMS04.confcd BRITS
python input_process.py --config ./configurations/PEMS04_12_SR-TR_0.1_prepare.conf
python main.py --config ./configurations/PEMS04_12_SR-TR_0.1.conf --for_test 0cd E2GAN
python train.py --config ./configurations/PEMS04_12_SR-TR_0.1.confcd GCASTN/GCASTN-main/code_data_paper_632/GCASTN
python train_GCASTN.py --config ./configurations/PEMS04.confcd IGNNK
python train.py --config ./configurations/PEMS04.confcd LATC
python train_LATC.py --config ./configurations/PEMS04_SR-TR_0.1.confcd mTAN
python train.py --config ./configurations/PEMS04_SR-TR_0.5.confcd PriSTI/PriSTI-main
python exe_survey.py --config ./config/pems04.yamlcd ASTGNN
python train_ASTGNN.py.py --config ./configurations/PEMS04_SR-TC_70.confcd imputeformer
python main.py.py --config ./configurations/PEMS04.yaml --data_prefix ./miss_data --dataset PEMS04 --miss_type SR-TR --miss_rate 0.9