EVOLUTION-MANAGER
Edit File: olvq1.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: Optimized Learning Vector Quantization 1</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 olvq1 {class}"><tr><td>olvq1 {class}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2> Optimized Learning Vector Quantization 1 </h2> <h3>Description</h3> <p>Moves examples in a codebook to better represent the training set. </p> <h3>Usage</h3> <pre> olvq1(x, cl, codebk, niter = 40 * nrow(codebk$x), alpha = 0.3) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>a matrix or data frame of examples </p> </td></tr> <tr valign="top"><td><code>cl</code></td> <td> <p>a vector or factor of classifications for the examples </p> </td></tr> <tr valign="top"><td><code>codebk</code></td> <td> <p>a codebook </p> </td></tr> <tr valign="top"><td><code>niter</code></td> <td> <p>number of iterations </p> </td></tr> <tr valign="top"><td><code>alpha</code></td> <td> <p>constant for training </p> </td></tr></table> <h3>Details</h3> <p>Selects <code>niter</code> examples at random with replacement, and adjusts the nearest example in the codebook for each. </p> <h3>Value</h3> <p>A codebook, represented as a list with components <code>x</code> and <code>cl</code> giving the examples and classes. </p> <h3>References</h3> <p>Kohonen, T. (1990) The self-organizing map. <em>Proc. IEEE</em> <b>78</b>, 1464–1480. </p> <p>Kohonen, T. (1995) <em>Self-Organizing Maps.</em> Springer, Berlin. </p> <p>Ripley, B. D. (1996) <em>Pattern Recognition and Neural Networks.</em> Cambridge. </p> <p>Venables, W. N. and Ripley, B. D. (2002) <em>Modern Applied Statistics with S.</em> Fourth edition. Springer. </p> <h3>See Also</h3> <p><code><a href="lvqinit.html">lvqinit</a></code>, <code><a href="lvqtest.html">lvqtest</a></code>, <code><a href="lvq1.html">lvq1</a></code>, <code><a href="lvq2.html">lvq2</a></code>, <code><a href="lvq3.html">lvq3</a></code> </p> <h3>Examples</h3> <pre> train <- rbind(iris3[1:25,,1], iris3[1:25,,2], iris3[1:25,,3]) test <- rbind(iris3[26:50,,1], iris3[26:50,,2], iris3[26:50,,3]) cl <- factor(c(rep("s",25), rep("c",25), rep("v",25))) cd <- lvqinit(train, cl, 10) lvqtest(cd, train) cd1 <- olvq1(train, cl, cd) lvqtest(cd1, train) </pre> <hr /><div style="text-align: center;">[Package <em>class</em> version 7.3-15 <a href="00Index.html">Index</a>]</div> </body></html>