← Back to all sparks
F

fastrg

ANALYTICS
Velocity0.0

R package fastrg by rohelab — release notes from GitHub.

A fast random-graph sampler that spent 0.3.1 fixing what its parameters actually mean.

random-graphsstochastic-blockmodelsnetwork-samplingsparse-matricesr-package
Current state
fastRG samples from generalized random dot product graphs — stochastic blockmodels, degree-corrected and overlapping variants, directed and undirected — in time proportional to the number of edges rather than nodes squared, which is what makes large sparse networks tractable. Since 0.3.1 the model is constructed and parameterised in one object, with sampling methods taking that object rather than re-specifying edge distribution at sample time.
Where it's heading
The package's development has been about semantic correctness more than speed. The 0.3.1 release moved edge-distribution arguments to the constructors and reinterpreted the mixing matrix S under Bernoulli parameterisation; 0.3.2 then flipped the meaning of X and Y in directed blockmodels so outgoing and incoming factors match the edge convention, and made block sorting conditional rather than unconditional. Both are corrections to what returned values mean, not to how fast they arrive. The 2025 release is CRAN documentation linking only.
Prediction
With parameterisation settled and only a documentation release since 2023, the package reads as feature-complete for its sampling families. Nothing in the entries points to additional model types being queued.

Recent moves

  1. 1y ago

    Documentation cross-linking fixes for CRAN

    Improves cross-links to other packages' documentation to satisfy CRAN. No change to sampling or model construction.

    View source ↗
  2. 2y ago

    Directed blockmodel X and Y factors swapped to match edge direction

    Directed stochastic blockmodels now put outgoing block information in X and incoming in Y, matching the convention that A[i, j] is an edge from i to j — a reversal of the previous behaviour. Block sorting becomes conditional on sort_nodes, isolated nodes stop being dropped from igraph and tidygraph output, and expected_degrees() gets a computation fix alongside new plot_expectation() and expectation() utilities.

    View source ↗
  3. 4y ago

    fastRG 0.3.1

    ⚡ SPARK

    The release that relocated model parameterisation: poisson_edges and allow_self_loops moved from the sample_*() methods onto the model constructors, and under Bernoulli parameterisation S became a matrix of connection probabilities converted internally to its Poisson equivalent. Overlapping and directed degree-corrected blockmodels arrived in the same release.

    View source ↗