I’m trying to write a Julia package that does roughly what R’s ergm package does: fit, simulate and diagnose exponential-family models of networks. R’s ergm is an excellent and a very mature package, and I’m definitely not trying to port all of it; I’m aiming for a blend of different functionalities from the ergm ecosystem that would suit my needs (and hopefully the needs of other Julia users interested in network modelling). The main motivation is “hackability” - adjusting ergm to my needs was difficult, and I want something that would allow me to extend/tweak existing functionality in a high-level language without compromising performance.
I have an initial working version here, and so far I wasn’t able to get close to the performance of R’s ergm sampling/inference algorithms (written mostly in C); I’ve read several performance guides that were previously suggested on this forum, and tried to use different macros to get additional speedups, but I’ve reached a point where I would really appreciate feedback from more experienced Julia users (I’m quite new to the language).
In case anyone’s interested:
base.jlcontains the main data structure, and various functions to compute graph and ERGM change statistics.
inference.jlcontains an implementation of the double MH sampler from Liang, 2010.
sa.jlcontains an implementation of the Stochastic Approximation algorithm from the appendix of Snijders, 2002.
- Notebooks contain various experiments and comparisons with R’s ergm using
I’d be happy to provide further details regarding the code/algorithms/anything else that might be helpful.