wenhaomin / DiffSTG

Code for DiffSTG
MIT License
54 stars 10 forks source link

Question about how to generate adj.npy of pems08. #2

Closed packer-c closed 6 months ago

packer-c commented 6 months ago

Hi, thanks for your nice work and code.

I saw you provided the adj.npy file. I would like to know how you generated the adj.npy. Could you provide some references code or repo?

Looking forward to your reply. Thanks in advance!

wenhaomin commented 6 months ago

Thanks for your question. We compute the Euclidean distances between monitoring stations and construct a weighted adjacency matrix using a thresholded Gaussian kernel:

image
cifang-Kasit commented 4 months ago

Hi. Thank you for your nice work and organized code.

As it mentioned previously, the adj is calculated by the Euclidean distances between stations.

However, the attached adj.npy file seems only contains binary value (0 or 1).

May I ask how can I solve this problem? Will it influence the performance of the spatial information obtain?

Looking forward to your reply. It is a really nice work. Thanks in advance! image

To make a comparison, another adj.npy example from STGCN is attached.

image

wenhaomin commented 4 months ago

Hi, Thanks for your question. The model can support both weighted adj and binary adj. We are sorry for the unclear clarification in previous anser. In our setting, the adj of air dataset is caluated by the Euclidean distances. And for the PEMS, we directly use the adj from previous works. Thanks~