fastRG0.4.0 package

Sample Generalized Random Dot Product Graphs in Linear Time

chung_lu

Create an undirected Chung-Lu object

dcsbm

Create an undirected degree corrected stochastic blockmodel object

directed_dcsbm

Create a directed degree corrected stochastic blockmodel object

directed_erdos_renyi

Create an directed erdos renyi object

directed_factor_model

Create a directed factor model graph

eigs_sym.undirected_factor_model

Compute the eigendecomposition of the expected adjacency matrix of an ...

erdos_renyi

Create an undirected erdos renyi object

expectation

Calculate the expected adjacency matrix

expected_edges

Calculate the expected edges in Poisson RDPG graph

mmsbm

Create an undirected degree-corrected mixed membership stochastic bloc...

overlapping_sbm

Create an undirected overlapping degree corrected stochastic blockmode...

planted_partition

Create an undirected planted partition object

plot_expectation

Plot (expected) adjacency matrices

reexports

Objects exported from other packages

sample_edgelist.matrix

Low level interface to sample RPDG edgelists

sample_edgelist

Sample a random edgelist from a random dot product graph

sample_igraph

Sample a random dot product graph as an igraph graph

sample_sparse

Sample a random dot product graph as a sparse Matrix

sample_tidygraph

Sample a random dot product graph as a tidygraph graph

sbm

Create an undirected stochastic blockmodel object

svds.directed_factor_model

Compute the singular value decomposition of the expected adjacency mat...

svds.undirected_factor_model

Compute the singular value decomposition of the expected adjacency mat...

undirected_factor_model

Create an undirected factor model graph

Samples generalized random product graphs, a generalization of a broad class of network models. Given matrices X, S, and Y with with non-negative entries, samples a matrix with expectation X S Y^T and independent Poisson or Bernoulli entries using the fastRG algorithm of Rohe et al. (2017) <https://www.jmlr.org/papers/v19/17-128.html>. The algorithm first samples the number of edges and then puts them down one-by-one. As a result it is O(m) where m is the number of edges, a dramatic improvement over element-wise algorithms that which require O(n^2) operations to sample a random graph, where n is the number of nodes.

  • Maintainer: Alex Hayes
  • License: MIT + file LICENSE
  • Last published: 2025-12-06