Open thosvarley opened 1 year ago
Thank you for raising an issue, I will look into it. It looks like a line of code from your original post has been updated from hmod.precompute_attributes(H)
-> H = hmod.precompute_attributes(H)
- just to clarify, you are still receiving the same error message with the updated code?
EDIT: I realize that I was feeding the Hgraph in wrong. I was doing:
{node : (hedge1, hedge2...)}
when I should have been doing {hedge1 : (node1, node2...)}
. Fixing this solved the issue.
Reopening the issue since the change described above just changes the error from being about strength to being about weight.
When I call
print('qH =',hmod.modularity(H, K, strict))
it returnsAttributeError: 'Entity' object has no attribute 'strength'
The full code:
Lookup is a dictionary of the form:
{key1 : (hedge1, hedge2...), key2 : (hedge1, hedge3...)}