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.