Replies: 1 comment
-
Yeah this seems like the right representation. It does look like a link regression problem. You could add an
Yeah that shouldn't be a problem mostly. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Matt,
I re-open this discussion to discuss my problem setting with you.
I'd like to predict delay time between several cities using GNN. I will make temporal graphs depending on
time steps
e.g. a graph with time stept=0, 1, 2, ...
Several cities can be linked each other with edges so we can have large directional graphs for each time step.
In this case, one transportation can be thought of 1 directional edge, and each node will have the location
(x, y)
or weather informations at each time step. Each edge will have travel information asedge features
likedeparture time
,arrival time
,distance
,average speed
, and so on.However, there might be several ways to transport between the same city
A -> B
, such as by train, airplane, walk, bicycle, car, and so on. In that case,edge_index
should be the same, but how can we have differentedge types
depending onmethod of transportation
?I think the goal is to predict labels which is
delay time
for each edge.My graph entities will look like this :
node
: citiesedge_index
:(num_edge, 2)
pos
(if needed): location of node in(x , y)
coordinatesnode_feature
:(x, y)
, orweather
informationedge_attribute
:departure time
,arrival time
,distance
,speed
between the two citieslabel
:delay_time
(I think it's property of edges, so is it link prediction regression problem?)Since city locations are determined by
(x, y)
location,nodes
do not have types .How can I apply different edge types in PyG? I mean, how can I differentiate edges even for the same route
A -> B
? Is it differentiated byedge_attribute
so it can have more edge attributes in there? I'm thinking like this:e.g. 1st edge
edge_attr
:distance, method of transport type in one-hot encoding = (239 , [1, 0, 0, 0, 0])
2nd edge
edge_attr
:distance, method of transport type in one-hot encoding = (47 , [0, 1, 0, 0, 0])
...
nth edge
edge_attr
:distance, method of transport type in one-hot encoding = (683 , [0, 0, 0, 1, 0])
Long story short :
Does this look correct graph entities for using GNN in PyG?
In that direction, at each time step, nodes are static, but edges will be always changing, and there can be multiple edges between the same nodes with different edge attribute. (I don't want to make my graphs too complicated. I want to make graphs as static as possible..)
If there’s no travel between two nodes, they will be isolated node, is it ok for a GNN to take isolated graph as their inputs?
Sorry for many questions, but thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions