pathpyG icon indicating copy to clipboard operation
pathpyG copied to clipboard

solving unweighted hons issue

Open VinsRR opened this issue 1 year ago • 1 comments

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.])

VinsRR avatar Apr 08 '24 07:04 VinsRR

BTW: This is related to #155

M-Lampert avatar Apr 10 '24 11:04 M-Lampert

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?

M-Lampert avatar May 03 '24 09:05 M-Lampert