Closed jkroenke closed 4 years ago
The problem occurs in core.network.Network.nsi_interregional_betweenness, too. As both call nsi_betweenness, I suspect the problem comes from there.
@cached_const
is wrong here. It should be either deleted or replaced with @cached_var
. In the latter case, the decorator would need to be patched to handle sources=..., targets=...
instead of key=...
.
Or, probably rather use: https://joblib.readthedocs.io/en/latest/generated/joblib.Memory.html
When a network is initialized and interregional_betweenness is called
the result
is correct for the first calculation. However, if interregional_betweenness is called a second time with different source and/or target nodes
the result is still the same. For a newly initialized network it is different: