pathpyG icon indicating copy to clipboard operation
pathpyG copied to clipboard

Edge Weight Representation

Open M-Lampert opened this issue 2 years ago • 1 comments

In the previous versions, we saved the number of times each walk or DAG appeared as a count/weight. This would translate to a graph feature for each PyG Data object. For the path statistics, it is probably more convenient to have the count/weight as edge weight. At first we added it in both ways for all representations were it is possible, but that leads to an error when using the PyG DataLoader in MultiOrderModel.from_DAGs. This is fixed for now (#154) but we should think about what representation is best also thinking about the order detection (#107).

M-Lampert avatar Apr 03 '24 13:04 M-Lampert

With #205, the representation changed back to weight per path/DAG saved in PathData.data.dag_weight which is the most memory efficient as long as the weights stay the same for all nodes and edges in each path/DAG. Using PathData.data.dag_weight.repeat_interleave(PathData.data.dag_num_edges) or similarly PathData.data.dag_weight.repeat_interleave(PathData.data.dag_num_nodes), the weights can be assigned to each edge/node.

M-Lampert avatar Oct 15 '24 14:10 M-Lampert