pathpy / pathpyG

GPU-accelerated Next-Generation Network Analytics and Graph Learning for Time Series Data on Complex Networks.
https://www.pathpy.net
GNU Affero General Public License v3.0
33 stars 3 forks source link

Fix/model selection index error #205

Closed M-Lampert closed 1 month ago

M-Lampert commented 1 month ago

Fixes #195 by redesigning PathData.

PathData now works as follows: Internally, it uses a Data object from PyG to store all paths in one graph. The original node indices are remapped to new indices so that each path stays a path and does not "collapse" to a graph. The original node index is saved in data.node_sequence similar to the usage of node_sequence in MultiOrderModel. Additionally, we save for each path the number of nodes and edges that correspond to the path, as well as a weight. This enables us e.g. to select the first node in each path using e.g. cumsum. Although the number of nodes is equal to the number of edges + 1, we save them individually as preparation for the integration of DAGs.