ragraph.analysis.heuristics
¶
Heuristics¶
Heuristics are combinations of algorithms available in the other sub-packages or have an output that does not strictly fit one of the other categories. Not all heuristics have a common argument structure because of their more diverse nature.
Available heuristics¶
johnson
circuit finding algorithm.markov_gamma
hierarchical clustering with bus detection heuristic.
johnson
¶
Donald B. Johnson's nested circuit finding algorithm. A circuit is a cycle in a graph, circuits can overlap or contain duplicate parts.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
graph |
Graph
|
Graph to find circuits in. |
required |
nodes |
Optional[List[Node]]
|
Nodes to consider during circuit search. |
None
|
inherit |
bool
|
Whether to take into account (inherit) edges between children during SCC calculations. |
True
|
Yields:
Type | Description |
---|---|
Union[List[str], List[Node]]
|
Node circuit lists. |
Note
Cannot cluster a graph directly since circuits may overlap in all sorts of ways. Therefore, it gives you cluster-related information, but no clear hierarchy.
Reference
Johnson, D. B. (1975). Finding all the elementary circuits of a directed graph. In SIAM J. COMPUT (Vol. 4). https://doi.org/10.1137/0204007
Source code in ragraph/analysis/heuristics/_johnson.py
markov_gamma
¶
|
Cluster a given graph hierarchically with buses on a local level or globally.
Source code in ragraph/analysis/heuristics/_markov_gamma.py
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
|
_johnson
¶
Donald B. Johnson's nested circuit finding algorithm¶
johnson
¶
Donald B. Johnson's nested circuit finding algorithm. A circuit is a cycle in a graph, circuits can overlap or contain duplicate parts.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
graph |
Graph
|
Graph to find circuits in. |
required |
nodes |
Optional[List[Node]]
|
Nodes to consider during circuit search. |
None
|
inherit |
bool
|
Whether to take into account (inherit) edges between children during SCC calculations. |
True
|
Yields:
Type | Description |
---|---|
Union[List[str], List[Node]]
|
Node circuit lists. |
Note
Cannot cluster a graph directly since circuits may overlap in all sorts of ways. Therefore, it gives you cluster-related information, but no clear hierarchy.
Reference
Johnson, D. B. (1975). Finding all the elementary circuits of a directed graph. In SIAM J. COMPUT (Vol. 4). https://doi.org/10.1137/0204007
Source code in ragraph/analysis/heuristics/_johnson.py
_markov_gamma
¶
Hierarchical Markov Clustering (HMC) with Gamma bus detection.¶
markov_gamma
¶
|
Cluster a given graph hierarchically with buses on a local level or globally.
Source code in ragraph/analysis/heuristics/_markov_gamma.py
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
|