EVOLUTION-MANAGER
Edit File: embed_laplacian_matrix.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: Spectral Embedding of the Laplacian of a Graph</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 embed_laplacian_matrix {igraph}"><tr><td>embed_laplacian_matrix {igraph}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Spectral Embedding of the Laplacian of a Graph</h2> <h3>Description</h3> <p>Spectral decomposition of Laplacian matrices of graphs. </p> <h3>Usage</h3> <pre> embed_laplacian_matrix( graph, no, weights = NULL, which = c("lm", "la", "sa"), type = c("default", "D-A", "DAD", "I-DAD", "OAP"), scaled = TRUE, options = igraph.arpack.default ) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>graph</code></td> <td> <p>The input graph, directed or undirected.</p> </td></tr> <tr valign="top"><td><code>no</code></td> <td> <p>An integer scalar. This value is the embedding dimension of the spectral embedding. Should be smaller than the number of vertices. The largest <code>no</code>-dimensional non-zero singular values are used for the spectral embedding.</p> </td></tr> <tr valign="top"><td><code>weights</code></td> <td> <p>Optional positive weight vector for calculating a weighted embedding. If the graph has a <code>weight</code> edge attribute, then this is used by default. For weighted embedding, edge weights are used instead of the binary adjacency matrix, and vertex strength (see <code><a href="strength.html">strength</a></code>) is used instead of the degrees.</p> </td></tr> <tr valign="top"><td><code>which</code></td> <td> <p>Which eigenvalues (or singular values, for directed graphs) to use. ‘lm’ means the ones with the largest magnitude, ‘la’ is the ones (algebraic) largest, and ‘sa’ is the (algebraic) smallest eigenvalues. The default is ‘lm’. Note that for directed graphs ‘la’ and ‘lm’ are the equivalent, because the singular values are used for the ordering.</p> </td></tr> <tr valign="top"><td><code>type</code></td> <td> <p>The type of the Laplacian to use. Various definitions exist for the Laplacian of a graph, and one can choose between them with this argument. </p> <p>Possible values: <code>D-A</code> means <i>D-A</i> where <i>D</i> is the degree matrix and <i>A</i> is the adjacency matrix; <code>DAD</code> means <i>D^1/2</i> times <i>A</i> times <i>D^{1/2}{D^1/2}</i>, <i>D^1/2</i> is the inverse of the square root of the degree matrix; <code>I-DAD</code> means <i>I-D^1/2</i>, where <i>I</i> is the identity matrix. <code>OAP</code> is <i>O^1/2 A P^1/2</i>, where <i>O^1/2</i> is the inverse of the square root of the out-degree matrix and <i>P^1/2</i> is the same for the in-degree matrix. </p> <p><code>OAP</code> is not defined for undirected graphs, and is the only defined type for directed graphs. </p> <p>The default (i.e. type <code>default</code>) is to use <code>D-A</code> for undirected graphs and <code>OAP</code> for directed graphs.</p> </td></tr> <tr valign="top"><td><code>scaled</code></td> <td> <p>Logical scalar, if <code>FALSE</code>, then <i>U</i> and <i>V</i> are returned instead of <i>X</i> and <i>Y</i>.</p> </td></tr> <tr valign="top"><td><code>options</code></td> <td> <p>A named list containing the parameters for the SVD computation algorithm in ARPACK. By default, the list of values is assigned the values given by <code><a href="arpack.html">igraph.arpack.default</a></code>.</p> </td></tr> </table> <h3>Details</h3> <p>This function computes a <code>no</code>-dimensional Euclidean representation of the graph based on its Laplacian matrix, <i>L</i>. This representation is computed via the singular value decomposition of the Laplacian matrix. </p> <p>They are essentially doing the same as <code><a href="embed_adjacency_matrix.html">embed_adjacency_matrix</a></code>, but work on the Laplacian matrix, instead of the adjacency matrix. </p> <h3>Value</h3> <p>A list containing with entries: </p> <table summary="R valueblock"> <tr valign="top"><td><code>X</code></td> <td> <p>Estimated latent positions, an <code>n</code> times <code>no</code> matrix, <code>n</code> is the number of vertices.</p> </td></tr> <tr valign="top"><td><code>Y</code></td> <td> <p><code>NULL</code> for undirected graphs, the second half of the latent positions for directed graphs, an <code>n</code> times <code>no</code> matrix, <code>n</code> is the number of vertices.</p> </td></tr> <tr valign="top"><td><code>D</code></td> <td> <p>The eigenvalues (for undirected graphs) or the singular values (for directed graphs) calculated by the algorithm.</p> </td></tr> <tr valign="top"><td><code>options</code></td> <td> <p>A named list, information about the underlying ARPACK computation. See <code><a href="arpack.html">arpack</a></code> for the details.</p> </td></tr> </table> <h3>Author(s)</h3> <p>Gabor Csardi <a href="mailto:csardi.gabor@gmail.com">csardi.gabor@gmail.com</a> </p> <h3>References</h3> <p>Sussman, D.L., Tang, M., Fishkind, D.E., Priebe, C.E. A Consistent Adjacency Spectral Embedding for Stochastic Blockmodel Graphs, <em>Journal of the American Statistical Association</em>, Vol. 107(499), 2012 </p> <h3>See Also</h3> <p><code><a href="embed_adjacency_matrix.html">embed_adjacency_matrix</a></code>, <code><a href="sample_dot_product.html">sample_dot_product</a></code> </p> <h3>Examples</h3> <pre> ## A small graph lpvs <- matrix(rnorm(200), 20, 10) lpvs <- apply(lpvs, 2, function(x) { return (abs(x)/sqrt(sum(x^2))) }) RDP <- sample_dot_product(lpvs) embed <- embed_laplacian_matrix(RDP, 5) </pre> <hr /><div style="text-align: center;">[Package <em>igraph</em> version 1.3.5 <a href="00Index.html">Index</a>]</div> </body></html>