ragraph.analysis.bus
¶
Bus detection algorithms¶
Bus detection algorithms find bus nodes in graphs, also called "hubs" or "integrative components". Typical bus nodes have a high node degree or "centrality" score.
All bus detection algorithms have the following arguments:
graph
: Graph to find bus nodes in.root
: Root node to perform bus detection in.leafs
: Optional list of leaf nodes to consider during the bus detection cycle. If not supplied, the leaf node descendants of the root will be considered.
They always return two lists of nodes:
- Leaf nodes that have been marked as bus nodes.
- The remaining leaf nodes.
They currently do NOT change anything in the graph in-place. That is up to the user.
Available algorithms¶
The following algorithms are directly available after importing
ragraph.analysis.bus
:
gamma
: Gamma bus detection.
gamma
¶
|
Detect bus nodes in a graph.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
graph
|
Graph
|
Graph to detect bus nodes in. |
required |
root
|
Optional[Union[Node, str]]
|
Root node of this bus detection analysis. |
None
|
leafs
|
Optional[Union[List[Node], List[str]]]
|
Optional list of nodes to consider leafs during this bus detection cycle. |
None
|
inherit
|
bool
|
Whether edges between descendants of nodes should be taken into account (if applicable). |
True
|
loops
|
bool
|
Whether self-loop edges should be taken into account (if applicable). |
False
|
gamma
|
float
|
Bus threshold w.r.t. median of nonzero node degrees. |
default
|
names
|
bool
|
Whether to return node names or node instances. |
False
|
Returns:
Type | Description |
---|---|
Union[Tuple[List[Node], List[Node]], Tuple[List[str], List[str]]]
|
Bus leafs. |
Union[Tuple[List[Node], List[Node]], Tuple[List[str], List[str]]]
|
Nonbus leafs. |
Note
Works by selecting node degree outliers by some factor gamma w.r.t. median of nonzero node degrees.
Reference
Wilschut, T., Etman, L. F. P., Rooda, J. E., & Adan, I. J. B. F. (2017). Multilevel Flow-Based Markov Clustering for Design Structure Matrices. Journal of Mechanical Design, 139(12), 121402. https://doi.org/10.1115/1.4037626
Source code in ragraph/analysis/bus/_gamma.py
_gamma
¶
Gamma bus detection¶
References
Wilschut, T., Etman, L. F. P., Rooda, J. E., & Adan, I. J. B. F. (2017). Multilevel Flow-Based Markov Clustering for Design Structure Matrices. Journal of Mechanical Design, 139(12), 121402. DOI: 10.1115/1.4037626
gamma_bus_detection
¶
|
Detect bus nodes in a graph.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
graph
|
Graph
|
Graph to detect bus nodes in. |
required |
root
|
Optional[Union[Node, str]]
|
Root node of this bus detection analysis. |
None
|
leafs
|
Optional[Union[List[Node], List[str]]]
|
Optional list of nodes to consider leafs during this bus detection cycle. |
None
|
inherit
|
bool
|
Whether edges between descendants of nodes should be taken into account (if applicable). |
True
|
loops
|
bool
|
Whether self-loop edges should be taken into account (if applicable). |
False
|
gamma
|
float
|
Bus threshold w.r.t. median of nonzero node degrees. |
default
|
names
|
bool
|
Whether to return node names or node instances. |
False
|
Returns:
Type | Description |
---|---|
Union[Tuple[List[Node], List[Node]], Tuple[List[str], List[str]]]
|
Bus leafs. |
Union[Tuple[List[Node], List[Node]], Tuple[List[str], List[str]]]
|
Nonbus leafs. |
Note
Works by selecting node degree outliers by some factor gamma w.r.t. median of nonzero node degrees.
Reference
Wilschut, T., Etman, L. F. P., Rooda, J. E., & Adan, I. J. B. F. (2017). Multilevel Flow-Based Markov Clustering for Design Structure Matrices. Journal of Mechanical Design, 139(12), 121402. https://doi.org/10.1115/1.4037626