EVOLUTION-MANAGER
Edit File: sample_hierarchical_sbm.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Sample the hierarchical stochastic block model</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for sample_hierarchical_sbm {igraph}"><tr><td>sample_hierarchical_sbm {igraph}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Sample the hierarchical stochastic block model</h2> <h3>Description</h3> <p>Sampling from a hierarchical stochastic block model of networks. </p> <h3>Usage</h3> <pre> sample_hierarchical_sbm(n, m, rho, C, p) hierarchical_sbm(...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>n</code></td> <td> <p>Integer scalar, the number of vertices.</p> </td></tr> <tr valign="top"><td><code>m</code></td> <td> <p>Integer scalar, the number of vertices per block. <code>n / m</code> must be integer. Alternatively, an integer vector of block sizes, if not all the blocks have equal sizes.</p> </td></tr> <tr valign="top"><td><code>rho</code></td> <td> <p>Numeric vector, the fraction of vertices per cluster, within a block. Must sum up to 1, and <code>rho * m</code> must be integer for all elements of rho. Alternatively a list of rho vectors, one for each block, if they are not the same for all blocks.</p> </td></tr> <tr valign="top"><td><code>C</code></td> <td> <p>A square, symmetric numeric matrix, the Bernoulli rates for the clusters within a block. Its size must mach the size of the <code>rho</code> vector. Alternatively, a list of square matrices, if the Bernoulli rates differ in different blocks.</p> </td></tr> <tr valign="top"><td><code>p</code></td> <td> <p>Numeric scalar, the Bernoulli rate of connections between vertices in different blocks.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>Passed to <code>sample_hierarchical_sbm</code>.</p> </td></tr> </table> <h3>Details</h3> <p>The function generates a random graph according to the hierarchical stochastic block model. </p> <h3>Value</h3> <p>An igraph graph. </p> <h3>Author(s)</h3> <p>Gabor Csardi <a href="mailto:csardi.gabor@gmail.com">csardi.gabor@gmail.com</a> </p> <h3>See Also</h3> <p><code><a href="sample_sbm.html">sbm.game</a></code> </p> <h3>Examples</h3> <pre> ## Ten blocks with three clusters each C <- matrix(c(1 , 3/4, 0, 3/4, 0, 3/4, 0 , 3/4, 3/4), nrow=3) g <- sample_hierarchical_sbm(100, 10, rho=c(3, 3, 4)/10, C=C, p=1/20) g if (require(Matrix)) { image(g[]) } </pre> <hr /><div style="text-align: center;">[Package <em>igraph</em> version 1.3.5 <a href="00Index.html">Index</a>]</div> </body></html>