ergmx.Control#
- class ergmx.Control(samplesize=1024, interval=1024, burnin=16384, n_chains=<factory>, triadic_weight=None, effective_size=64, max_interval=1048576, max_iter=60, steplength_margin=0.05, last_boost=4, density_guard=20.085536923187668, density_guard_min=10000, stall_iterations=10, cd_steps=8, cd_samplesize=1024, cd_max_iter=60, cd_conv_min_pval=0.5, bridges=32, bridge_chains=1, bridge_samplesize=256)[source]#
Tuning parameters of the MCMC and of the Monte Carlo MLE.
The defaults follow ergm: 1024 samples, 1024 proposals apart, after 16 times as many burn-in proposals. When the samples are too autocorrelated to reach
effective_size, the interval (and the burn-in) grows.- samplesize = 1024#
Networks sampled per iteration, split across the chains.
- interval = 1024#
MCMC proposals between two sampled networks, at the start.
- burnin = 16384#
MCMC proposals discarded at the start of every chain, at the start.
- n_chains#
Parallel Markov chains (one thread each).
- triadic_weight = None#
Share of triadic MCMC proposals (they close or open a triangle). None uses 0.5 for models with triangle or shared partner terms, 0 otherwise.
- effective_size = 64#
Minimum effective sample size per iteration; None keeps the interval fixed.
- max_interval = 1048576#
Largest interval the adaptation may reach.
- max_iter = 60#
Maximum number of Monte Carlo MLE iterations.
- steplength_margin = 0.05#
Margin by which the target must lie inside the sample’s convex hull.
- last_boost = 4#
The final iteration samples this many times more networks.
- density_guard = 20.085536923187668#
Stop if a simulated network has more than this many times the observed edges (and more than
density_guard_min), as ergm does.
- density_guard_min = 10000#
Edges a simulated network may always have, whatever the density guard.
- stall_iterations = 10#
Stop after this many consecutive iterations with a step length below 0.1; None never stops early.
- cd_steps = 8#
MCMC proposals from the observed network per sample.
- Type:
Contrastive divergence
- cd_samplesize = 1024#
samples per iteration.
- Type:
Contrastive divergence
- cd_max_iter = 60#
maximum number of iterations.
- Type:
Contrastive divergence
- cd_conv_min_pval = 0.5#
Contrastive divergence stops when Hotelling’s test of the samples against the observed statistics has a larger p-value, as in ergm.
- bridges = 32#
intervals along the path, with samples at both ends of each.
- Type:
Log-likelihood by path sampling
- bridge_chains = 1#
chains per point of the path.
- Type:
Log-likelihood by path sampling
- bridge_samplesize = 256#
samples per chain, spaced by the interval the Monte Carlo MLE ended with.
- Type:
Log-likelihood by path sampling