Choose the appropriate PecanPy mode
masterPecanPy uses three primary modes optimized for different network sizes and densities. Choosing the correct mode is critical for performance.
| Mode | Network size/density | Optimization |
|---|---|---|
PreComp | <10k nodes, <0.1% edges | Precompute second order transition probabilities, using CSR graph |
SparseOTF (default) | (≥10k nodes, ≥0.1% and <20% of edges) or (<10k nodes, ≥0.1% edges) | Transition probabilities computed on-the-fly, using CSR graph |
DenseOTF | >20% of edges | Transition probabilities computed on-the-fly, using dense matrix |
Recommendations:
- Use
PreCompif the graph is small and sparse. - Use
SparseOTFif the graph is sparse but not necessarily small. - Use
DenseOTFif the graph is extremely dense.