EVOLUTION-MANAGER
Edit File: scg_eps.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: Error of the spectral coarse graining (SCG) approximation</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 scg_eps {igraph}"><tr><td>scg_eps {igraph}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Error of the spectral coarse graining (SCG) approximation</h2> <h3>Description</h3> <p><code>scg_eps</code> computes <i>|v[i]-Pv[i]|</i>, where <i>v[i]</i> is the <i>i</i>th eigenvector in <code>V</code> and <i>P</i> is the projector corresponding to the <code>mtype</code> argument. </p> <h3>Usage</h3> <pre> scg_eps( V, groups, mtype = c("symmetric", "laplacian", "stochastic"), p = NULL, norm = c("row", "col") ) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>V</code></td> <td> <p>A numeric matrix of (eigen)vectors assumed normalized. The vectors are to be stored column-wise in <code>V</code>).</p> </td></tr> <tr valign="top"><td><code>groups</code></td> <td> <p>A vector of <code>nrow(V)</code> integers labeling each group vertex in the partition.</p> </td></tr> <tr valign="top"><td><code>mtype</code></td> <td> <p>The type of semi-projector used for the SCG. For now “symmetric”, “laplacian” and “stochastic” are available.</p> </td></tr> <tr valign="top"><td><code>p</code></td> <td> <p>A probability vector of length <code>nrow(V)</code>. <code>p</code> is the stationary probability distribution of a Markov chain when <code>mtype</code> = “stochastic”. This parameter is ignored otherwise.</p> </td></tr> <tr valign="top"><td><code>norm</code></td> <td> <p>Either “row” or “col”. If set to “row” the rows of the Laplacian matrix sum to zero and the rows of the stochastic matrix sum to one; otherwise it is the columns.</p> </td></tr> </table> <h3>Value</h3> <p><code>scg_eps</code> returns with a numeric vector whose <i>i</i>th component is <i>|v[i]-Pv[i]|</i> (see Details). </p> <h3>Author(s)</h3> <p>David Morton de Lachapelle, <a href="http://people.epfl.ch/david.morton">http://people.epfl.ch/david.morton</a>. </p> <h3>References</h3> <p>D. Morton de Lachapelle, D. Gfeller, and P. De Los Rios, Shrinking Matrices while Preserving their Eigenpairs with Application to the Spectral Coarse Graining of Graphs. Submitted to <em>SIAM Journal on Matrix Analysis and Applications</em>, 2008. <a href="http://people.epfl.ch/david.morton">http://people.epfl.ch/david.morton</a> </p> <h3>See Also</h3> <p><a href="scg-method.html">scg-method</a> and <code><a href="scg.html">scg</a></code>. </p> <h3>Examples</h3> <pre> v <- rexp(20) km <- kmeans(v,5) sum(km$withinss) scg_eps(cbind(v), km$cluster)^2 </pre> <hr /><div style="text-align: center;">[Package <em>igraph</em> version 1.3.5 <a href="00Index.html">Index</a>]</div> </body></html>