network
Classes:
-
Mapper
–
Mapper
Mapper(mcs_data)
Methods:
-
node_to_dst_from_origin
–Get the
-
mult_dst_cycle
–So 0.10.101 > 0.2*0.05 * 0.05
-
norm_mult_dst_cycle
–So 0.10.101 > 0.2*0.05 * 0.05
-
select_path
–Always use path with better perturbations.
-
add_shortest_paths_hub
–HUB approach.
-
cycle_closure_hub
–Cycle Closure
Source code in ties/modules/network.py
27 28 |
|
node_to_dst_from_origin
node_to_dst_from_origin(paths)
Get the :param paths: :return:
Source code in ties/modules/network.py
81 82 83 84 85 86 87 88 89 90 91 92 |
|
mult_dst_cycle
mult_dst_cycle(path)
So 0.10.101 > 0.2*0.05 * 0.05 So a larger number is better
:param path: :return:
Source code in ties/modules/network.py
138 139 140 141 142 143 144 145 146 |
|
norm_mult_dst_cycle
norm_mult_dst_cycle(path)
So 0.10.101 > 0.2*0.05 * 0.05 So a larger number is better
:param path: :return:
Source code in ties/modules/network.py
148 149 150 151 152 153 154 155 156 |
|
select_path
select_path(paths, paths_to_ignore=None, limit=0.35)
Always use path with better perturbations.
:param paths: :return:
Source code in ties/modules/network.py
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 |
|
add_shortest_paths_hub
add_shortest_paths_hub()
HUB approach.
Take a list of nodes that have more than "1 edge". This means that they have other edges going via them.
Hub size
- 1 extra node: just add one edge (cumulative)
- 2 or more nodes: add 2 more edges
Hub distance
- 1 (direct): add one edge
- 2: add two edges
- 3: 4 edges
- 4: 5 edges
Hub size/distance -> edges: - 0/* -> 0 - 1/1 -> 0 - 2/1 -> 1 - =>3/1 -> 2
- 1/2 -> 1
-
1/3 -> 1
-
2/2 -> 2
-
2/3 -> 3 ?
-
3/2 -> 3
-
2/>3 -> 3
-
3/3 -> 4
-
3/>3 -> 5
It will be important that these new paths will have cycles.
Source code in ties/modules/network.py
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 |
|
cycle_closure_hub
cycle_closure_hub()
Cycle Closure
For hubs, we need cycle closure. Ideally, it would not an "edge" cycle closure.
Find all simple cycles
Source code in ties/modules/network.py
293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 |
|