sg-dev / pathpy

pathpy is an OpenSource python package for the analysis of time series data on networks using higher-order and multi-order graphical models.
GNU Affero General Public License v3.0
2 stars 0 forks source link

Bug in BetweennessCentrality #40

Closed SimonNick closed 6 years ago

SimonNick commented 6 years ago

The function does not check whether paths that are retrieved by converting higher-order shortest paths to first-order paths are indeed first-order shortest paths.

Example:

Given the following paths: 0->1->2 1->2->3 2->3->4 0->5->6 5->6->4

The algorithm will find two shortest paths between node 0 and 4, namely 0->1->2->3->4 and 0->5->6->4. However the first path has length 4, which is greater than the length of the latter path, which has length 3. So the first path is not a shortest path.

Am I correct?

IngoScholtes commented 6 years ago

Merged in branch DAG also fixed in branch pathpy2