tsinghua-fib-lab / UniST

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

spatial partition #21

Open liyuzhan opened 5 days ago

liyuzhan commented 5 days ago

Hello author, I would like to ask what is the basis of the spatial partition of your data set? If I want to load a new data set during your data load process, how should I partition the new data set?

YuanYuan98 commented 5 days ago

The spatial partitioning in our dataset generally targets a grid size of about 1-2 km. However, there isn’t a strict division, as datasets like TaxiNYC and Taxi Bike are publicly available and may not specify exact spatial granularity. For your own dataset, I recommend partitioning the city into 100-500 grids to achieve a balanced representation.

liyuzhan commented 5 days ago

I intend to convert the graph dataset into a grid dataset, using the PMS-Bay dataset as an example, in the format (52116,325,2), where 52116 is the length of time,325 is the number of nodes, and 2 is the feature. How should space be partitioned

YuanYuan98 commented 4 days ago

To adapt UniST to graph-based data, you can adjust the spatial patch size to 1. This will allow you to apply the same spatio-temporal patching technique that is used for grid-based data.

Specifically, you would reshape the data to have a shape of $N\times T \times 1 \times W$, where $W$ is the number of nodes.

This will enable UniST to process the graph data by treating each node as a single spatial unit over time.