How to match graph‘s node amount with my dataset?

I have some datasets about hydrological stations which looks like this:

    station_id    streamflow   waterlevel
0       0           1.0             1.3
1       0           0.5             1.6
2       0           0.8             0.9
……

When I have 100 stations, I concatenated them to a DataFrame and now it look likes this:

    station_id    streamflow   waterlevel
0       0           1.0             1.3
1       0           0.5             1.6
2       0           0.8             0.9
3       1           1.0             1.3
4       1           0.5             1.6
5       1           0.8             0.9
……
298       99           1.0             1.3
299       99           0.5             1.6
300       99           0.8             0.9

However, when I use dgl’s GraphDataLoader to load these data, its dimensions became (batch_size, sequence_length, features), such as (256x240x20), so it means that in a batch there are probably datas from same station_id but diffrent index in a station or different station_id but same index in a station.
If I use a DGL graph which has 100 nodes to represents 100 stations above, dgl.nn.pytorch.conv.gatv2conv.GATv2Conv crashed like this:

dgl._ffi.base.DGLError: Expect number of features to match number of nodes (len(u)). 
Got 32768(256*128) and 100 instead.

So how to match len(u) and number of features? Thank for your reply.

I don’t quite understand the full picture here. So far I only see probably a sequence of station IDs and the streamflows/waterlevels but I don’t know how the graph looks like.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.