tsinghua-fib-lab / UniST

Official implementation for "UniST: A Prompt-Empowered Universal Model for Urban Spatio-Temporal Prediction" (KDD 2024)
80 stars 11 forks source link

如何使用这个模型推理 #12

Open tianlianghai opened 1 month ago

tianlianghai commented 1 month ago

已经在Bike数据集训练和微调好了,使用自己的数据来进行预测呢

YuanYuan98 commented 1 month ago

Please format your own data according to the guidelines provided in our dataset documentation.

tianlianghai commented 1 month ago

thanks for your reply, but I looked up on the internet and the paper. I don't find how the data is preprocessed. the spatial-temporal shape in NYC bike dataset is [1, 12, 16, 8], I think [16, 8] are the grid size of city given that the city is partitionized. but what does the value mean, the number of the bike? I can't find the related information.

And for the period data [3, 12, 16, 8], what does the value mean in this data. and does it mean every 3 day the data will be the same thing, why the period is 3?

Only by knowing the original information meaning, can I use my own dataset, and do the preprocessing accordingly. Thank you.

tianlianghai commented 1 month ago

I'd like to summarize my question:

  1. what does the value in nyc bike mean? does it mean the number of bikes located at that block at that time?
  2. what does the period data mean, since it has a period T=3, how does it related to the spatial temporal data?
YuanYuan98 commented 1 month ago
  1. The NYC bike dataset you are referring to is sourced from the NYC dataset. It represents bicycle traffic data. The values likely indicate the number of bicycles used in a particular block at a given time.

  2. For example, the dataset, formatted as [3, 12, 16, 8], records data from the past 3 days for the corresponding time slot (one out of 12) for each location (covering $16 \times 8$ grid locations). Here, T is just a pre-defined parameter. UniST is designed to be flexible to different values of T by utilizing an attention mechanism, which adapts to various sequence lengths effectively.

This information should help you understand how to adjust your own dataset preprocessing.

ant00469 commented 3 weeks ago

谢谢老师您的指导,结合老师您在README.md中提到的 Shape: (N×T×H×W) Description: o(N): Number of samples o(T): Temporal length o(H): Height of the spatial grid o(W): Width of the spatial grid 可以这样理解[3, 12, 16, 8]分别代表的含义是: [16,8]是城市的网格大小16米 X 8米, 3表示3辆自行车,预测在16米 X 8米的城市网格中会出现的单车数量, 而这里的12 表示在12点, 这样理解对吗? 谢谢老师指点!!