Description Usage Arguments Details Value References Examples

These calculations are conditional on the latent factors
`X`

and `Y`

.

1 2 3 4 5 6 7 8 9 10 11 | ```
expected_edges(factor_model, ...)
expected_degree(factor_model, ...)
expected_in_degree(factor_model, ...)
expected_out_degree(factor_model, ...)
expected_density(factor_model, ...)
expected_degrees(factor_model, ...)
``` |

`factor_model` |
A |

`...` |
Ignored. Do not use. |

Note that the runtime of the `fastRG`

algorithm is proportional to
the expected number of edges in the graph. Expected edge count will be
an underestimate of expected number of edges for Bernoulli
graphs. See the Rohe et al for details.

Expected edge counts, or graph densities.

Rohe, Karl, Jun Tao, Xintian Han, and Norbert Binkiewicz. 2017. "A Note on Quickly Sampling a Sparse Matrix with Low Rank Expectation." Journal of Machine Learning Research; 19(77):1-13, 2018. https://www.jmlr.org/papers/v19/17-128.html

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | ```
n <- 10000
k <- 5
X <- matrix(rpois(n = n * k, 1), nrow = n)
S <- matrix(runif(n = k * k, 0, .1), nrow = k)
ufm <- undirected_factor_model(X, S)
expected_edges(ufm)
expected_degree(ufm)
eigs_sym(ufm)
n <- 10000
d <- 1000
k1 <- 5
k2 <- 3
X <- matrix(rpois(n = n * k1, 1), nrow = n)
Y <- matrix(rpois(n = d * k2, 1), nrow = d)
S <- matrix(runif(n = k1 * k2, 0, .1), nrow = k1)
dfm <- directed_factor_model(X = X, S = S, Y = Y)
expected_edges(dfm)
expected_in_degree(dfm)
expected_out_degree(dfm)
svds(dfm)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.