Why the shape of data.y could be arbitrary? #9060
-
Hi everyone, I noticed that the description of data.y is as follows: "data.y: Target to train against (may have arbitrary shape), e.g., node-level targets of shape [num_nodes, *] or graph-level targets of shape [1, *]" I am a little confused about the above description and got two questions: We all know that a label is an 1D vector. So the shape of data.y targets node-level should be [num_nodes,]. But why the shape of data.y is [1,]? Why isn't it the number of graphs? i.e. [num_graphs]? Another question is why the shape of data.y could be arbitrary? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
That's because a graph is represented as a
This is an intentional design to provide more flexibility to accommodate different scenarios. |
Beta Was this translation helpful? Give feedback.
That's because a graph is represented as a
data
object, where eachdata
(graph) is associated with a scalar labely
represented as a one-dimensional vector [1, *].This is an intentional design to provide more flexibility to accommodate different scenarios.
In certain cases, nodes may have multiple labels, such as in the PPI dataset. In such cases, the labels are represented as 2D vector.