@@ -91,15 +91,15 @@ GNNGraph:
9191```
9292
9393## Data Features
94-
95- Node, edge, and graph features can be added at construction time or later using:
94+ A temporal graph can stode global feautre for the entire time series in the ` tgdata ` filed.
95+ Also, each snapshot can store node, edge, and graph features in the ` ndata ` , ` edata ` , and ` gdata ` fields, respectively.
9696
9797``` jldoctest
9898julia> snapshots = [rand_graph(10,20; ndata = rand(3,10)), rand_graph(10,14; ndata = rand(4,10)), rand_graph(10,22; ndata = rand(5,10))]; # node features at construction time
9999
100100julia> tg = TemporalSnapshotsGNNGraph(snapshots);
101101
102- julia> tg.tgdata.y = rand(3,1); # graph features after construction
102+ julia> tg.tgdata.y = rand(3,1); # add global features after construction
103103
104104julia> tg
105105TemporalSnapshotsGNNGraph:
@@ -109,7 +109,7 @@ TemporalSnapshotsGNNGraph:
109109 tgdata:
110110 y = 3×1 Matrix{Float64}
111111
112- julia> tg.ndata # vector of Datastore for node features
112+ julia> tg.ndata # vector of DataStore containing node features for each snapshot
1131133-element Vector{DataStore}:
114114 DataStore(10) with 1 element:
115115 x = 3×10 Matrix{Float64}
@@ -118,8 +118,10 @@ julia> tg.ndata # vector of Datastore for node features
118118 DataStore(10) with 1 element:
119119 x = 5×10 Matrix{Float64}
120120
121- julia> typeof(tg.ndata.x) # vector containing the x feature of each snapshot
122- Vector{Matrix{Float64}}
121+ julia> [ds.x for ds in tg.ndata]; # vector containing the x feature of each snapshot
122+
123+ julia> [g.x for g in tg.snapshots]; # same vector as above, now accessing
124+ # the x feature directly from the snapshots
123125```
124126
125127## Graph convolutions on TemporalSnapshotsGNNGraph
0 commit comments