tsinghua-fib-lab / UniST

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

Working on Graph data #5

Open JasonStraka opened 3 months ago

JasonStraka commented 3 months ago

Hi, thank you for your nice work and for sharing the code.

The datasets used in expernments are based on grid structure with Shape: $(N \times T \times H \times W)$ , but in README (which says UniST supports Data Format of Grid/Graph). How to Work on Graph data like METR-LA (Metro Traffic Los Angeles) with shape [N, T, C] (Number of nodes, time length, feature). There is no grid structure in raw dataset METR-LA.

YuanYuan98 commented 3 months 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.

HuangYH0921 commented 3 weeks ago

Hello, may I ask how to reflect the relationship between the spatial positions of each point after the data is reshaped into the shape of N × T × 1 × W? For example, how do I input the adjacency matrix?