BUAABIGSCity / PDFormer

[AAAI2023] A PyTorch implementation of PDFormer: Propagation Delay-aware Dynamic Long-range Transformer for Traffic Flow Prediction.
MIT License
203 stars 34 forks source link

process non-traffic data #5

Closed LittleTigger-alpha closed 1 year ago

LittleTigger-alpha commented 1 year ago

Can PDFormer handle non-traffic data, such as ECG500 or electricity. There is no geographical distance relationship between variables, but there may be an implicit relationship. If the model can process, how to process these datasets? Your help would be much appreciated!

aptx1231 commented 1 year ago

It should work, but you need to process the code to remove the geographic distance mask matrix (which is the geo_mask in the code) and keep only the semantic mask matrix. In that case, the attention mechanism will only keep the semantic spatial attention as well. For data processing, just process into atomic files, and refer to the libcity documentation for the definition of the format.

Besides, you can refer to the LibCity repository and the KDD CUP repository we developed, which have many spatio-temporal prediction methods that are suitable for dealing with such multivariate temporal prediction problems with implicit dependencies.