pyotc.examples package¶
Submodules¶
pyotc.examples.edge_awareness module¶
networkx graphs for edge awareness example and corresponding costs from Table 1
[Alignment and Comparison of Directed Networks via Transition Couplings of Random Walks](https://arxiv.org/abs/2106.07106)
Figure 4 graphs
G_1 is the regular octogon
G_2 is the regular octogon removing 1 edge
G_3 is uniform edge lengths of the octogon removing 1 edge
pyotc.examples.lollipops module¶
networkx graphs for lollipop examples given in
[Alignment and Comparison of Directed Networks via Transition Couplings of Random Walks](https://arxiv.org/abs/2106.07106)
Figure 5 graphs
lollipop_1 is the left graph
lollipop_2 is the right graph
pyotc.examples.stochastic_block_model module¶
- pyotc.examples.stochastic_block_model.stochastic_block_model(sizes: tuple, probs: ndarray) ndarray [source]¶
Generate the adjacency for a stochastic block model SBM from a tuple (length n) of sizes an (nxn) matrix of probabilities.
- Parameters:
sizes (tuple) – tuple of node sizes with length of number of blocks
probs (np.ndarray) – nxn symmetric matrix
- Raises:
ValueError – If probs is not a square numpy array
ValueError – If probs is not symmetric
ValueError – If sizes and probs dimensions do not match
- Returns:
adjancency matrix for SBM
- Return type:
np.ndarray
pyotc.examples.wheel module¶
networkx graphs for wheel graph examples given in Version 1 of
[Alignment and Comparison of Directed Networks via Transition Couplings of Random Walks](https://arxiv.org/pdf/2106.07106v1.pdf)
Figure 2 graphs
G_1 is a wheel graph of order 16
G_2 is a wheel graph removing 1 spoke edge
G_3 is a wheel graph removing 1 wheel edge