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
31 stars 1 forks source link

solving unweighted hons issue #157

Closed VinsRR closed 4 months ago

VinsRR commented 5 months ago

The higher-order networks were unweighted. This snippet:

dag_data = pp.DAGData(pp.IndexMap(list("01234")))
dag_data.append_walk(list("023"), weight=20)
dag_data.append_walk(list("124"), weight=30)

m = pp.MultiOrderModel.from_DAGs(dag_data, max_order=2)

hon_1 = m.layers[1]
hon_2 = m.layers[2]
print(hon_1.data.edge_weight)
print(hon_2.data.edge_weight)

Gives this:

tensor([1., 1., 1., 1.])
tensor([1., 1.])
M-Lampert commented 5 months ago

BTW: This is related to #155

M-Lampert commented 5 months ago

Could be closed due to #173, but best practice would be to merge it into #173 instead to have a clearer/cleaner merge history. @VinsRR can you either close it or merge it?