Tools: computational analysis
Networks, machine learning, embeddings, and simulation
The maintained version of the “Useful Tools” list closing Chapter 8. Last reviewed August 2026.
Network analysis
- NetworkX (Python): readable API, excellent documentation, the right starting point. Slows on very large graphs.
- igraph (C, Python, R): compiled core, much faster at scale.
- statnet (R): ERGMs and statistical models of tie formation, for explanatory work on network structure.
- graph-tool (Python): very fast; heavier installation.
Visualization: Gephi for publication-quality interactive layouts, Cytoscape for attribute-rich networks. Always report the layout algorithm and its parameters (Chapter 9, §9.4.5).
Machine learning
- scikit-learn: the baseline for everything in this book.
- XGBoost and LightGBM: gradient boosting, usually the strongest tabular performers.
- SHAP: feature attributions, global and per-prediction. Remember Chapter 7’s caution: an explanation of a prediction is not a causal claim.
Embeddings
- gensim: Word2Vec, the classic entry point.
- Sentence-Transformers: pretrained document-level embeddings.
- UMAP: projection for visualization. Report the algorithm, its parameters, and the output dimensionality; Chapter 9 (§9.4.5) shows how much the picture changes without them.
Simulation
Causal inference with machine learning
Reproducibility
Set and record a random seed for every stochastic step. Pin versions with a lock file (Chapter 9, §9.3.2). See communication tools for environment management.