📄 som.html
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>R: Self-Organizing Maps: Online Algorithm</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="../../R.css">
</head><body>
<table width="100%" summary="page for SOM {class}"><tr><td>SOM {class}</td><td align="right">R Documentation</td></tr></table>
<h2>Self-Organizing Maps: Online Algorithm</h2>
<h3>Description</h3>
<p>
Kohonen's Self-Organizing Maps are a crude form of multidimensional scaling.
</p>
<h3>Usage</h3>
<pre>
SOM(data, grid = somgrid(), rlen = 10000, alpha, radii, init)
</pre>
<h3>Arguments</h3>
<table summary="R argblock">
<tr valign="top"><td><code>data</code></td>
<td>
a matrix or data frame of observations, scaled so that Euclidean
distance is appropriate.
</td></tr>
<tr valign="top"><td><code>grid</code></td>
<td>
A grid for the representatives: see <code><a href="somgrid.html">somgrid</a></code>.
</td></tr>
<tr valign="top"><td><code>rlen</code></td>
<td>
the number of updates: used only in the defaults for <code>alpha</code> and <code>radii</code>.
</td></tr>
<tr valign="top"><td><code>alpha</code></td>
<td>
the amount of change: one update is done for each element of <code>alpha</code>.
Default is to decline linearly from 0.05 to 0 over <code>rlen</code> updates.
</td></tr>
<tr valign="top"><td><code>radii</code></td>
<td>
the radii of the neighbourhood to be used for each update: must be the
same length as <code>alpha</code>. Default is to decline linearly from 4 to 1
over <code>rlen</code> updates.
</td></tr>
<tr valign="top"><td><code>init</code></td>
<td>
the initial representatives. If missing, chosen (without replacement)
randomly from <code>data</code>.
</td></tr>
</table>
<h3>Details</h3>
<p>
<code>alpha</code> and <code>radii</code> can also be lists, in which case each component is
used in turn, allowing two- or more phase training.
</p>
<h3>Value</h3>
<p>
an object of class <code>"SOM"</code> with components
</p>
<table summary="R argblock">
<tr valign="top"><td><code>grid</code></td>
<td>
the grid, an object of class <code>"somgrid"</code>.
</td></tr>
<tr valign="top"><td><code>codes</code></td>
<td>
a matrix of representatives.
</td></tr>
</table>
<h3>References</h3>
<p>
Kohonen, T. (1995) <EM>Self-Organizing Maps.</EM> Springer-Verlag
</p>
<p>
Kohonen, T., Hynninen, J., Kangas, J. and Laaksonen, J. (1996)
<EM>SOM PAK: The self-organizing map program package.</EM>
Laboratory of Computer and Information Science, Helsinki University
of Technology, Technical Report A31.
</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="somgrid.html">somgrid</a></code>, <code><a href="batchSOM.html">batchSOM</a></code>
</p>
<h3>Examples</h3>
<pre>
data(crabs, package = "MASS")
lcrabs <- log(crabs[, 4:8])
crabs.grp <- factor(c("B", "b", "O", "o")[rep(1:4, rep(50,4))])
gr <- somgrid(topo = "hexagonal")
crabs.som <- SOM(lcrabs, gr)
plot(crabs.som)
## 2-phase training
crabs.som2 <- SOM(lcrabs, gr,
alpha = list(seq(0.05, 0, len = 1e4), seq(0.02, 0, len = 1e5)),
radii = list(seq(8, 1, len = 1e4), seq(4, 1, len = 1e5)))
plot(crabs.som2)
</pre>
<hr><div align="center">[Package <em>class</em> version 7.2-44 <a href="00Index.html">Index]</a></div>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -