📄 sammon.html
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>R: Sammon's Non-Linear Mapping</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 sammon {MASS}"><tr><td>sammon {MASS}</td><td align="right">R Documentation</td></tr></table>
<h2>Sammon's Non-Linear Mapping</h2>
<h3>Description</h3>
<p>
One form of non-metric multidimensional scaling.
</p>
<h3>Usage</h3>
<pre>
sammon(d, y = cmdscale(d, k), k = 2, niter = 100, trace = TRUE,
magic = 0.2, tol = 1e-4)
</pre>
<h3>Arguments</h3>
<table summary="R argblock">
<tr valign="top"><td><code>d</code></td>
<td>
distance structure of the form returned by <code>dist</code>, or a full, symmetric
matrix. Data are assumed to be dissimilarities or relative distances,
but must be positive except for self-distance. This can contain missing
values.
</td></tr>
<tr valign="top"><td><code>y</code></td>
<td>
An initial configuration. If none is supplied, <code>cmdscale</code>
is used to provide the classical solution. (If there are missing
values in <code>d</code>, an initial configuration must be provided.) This
must not have duplicates.
</td></tr>
<tr valign="top"><td><code>k</code></td>
<td>
The dimension of the configuration.
</td></tr>
<tr valign="top"><td><code>niter</code></td>
<td>
The maximum number of iterations.
</td></tr>
<tr valign="top"><td><code>trace</code></td>
<td>
Logical for tracing optimization. Default <code>TRUE</code>.
</td></tr>
<tr valign="top"><td><code>magic</code></td>
<td>
initial value of the step size constant in diagonal Newton method.
</td></tr>
<tr valign="top"><td><code>tol</code></td>
<td>
Tolerance for stopping, in units of stress.
</td></tr>
</table>
<h3>Details</h3>
<p>
This chooses a two-dimensional configuration to minimize the stress,
the sum of squared differences between the input distances and those
of the configuration, weighted by the distances, the whole sum being
divided by the sum of input distances to make the stress scale-free.
</p>
<p>
An iterative algorithm is used, which will usually converge in around
50 iterations. As this is necessarily an <i>O(n^2)</i> calculation, it is slow
for large datasets. Further, since the configuration is only determined
up to rotations and reflections (by convention the centroid is at the
origin), the result can vary considerably from machine to machine.
In this release the algorithm has been modified by adding a step-length
search (<code>magic</code>) to ensure that it always goes downhill.
</p>
<h3>Value</h3>
<p>
Two components:
</p>
<table summary="R argblock">
<tr valign="top"><td><code>points</code></td>
<td>
A two-column vector of the fitted configuration.
</td></tr>
<tr valign="top"><td><code>stress</code></td>
<td>
The final stress achieved.
</td></tr>
</table>
<h3>Side Effects</h3>
<p>
If trace is true, the initial stress and the current stress are printed
out every 10 iterations.
</p>
<h3>References</h3>
<p>
Sammon, J. W. (1969)
A non-linear mapping for data structure analysis.
<EM>IEEE Trans. Comput.</EM>, <B>C-18</B> 401–409.
</p>
<p>
Ripley, B. D. (1996)
<EM>Pattern Recognition and Neural Networks</EM>. Cambridge University Press.
</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="../../stats/html/cmdscale.html">cmdscale</a></code>, <code><a href="isoMDS.html">isoMDS</a></code>
</p>
<h3>Examples</h3>
<pre>
swiss.x <- as.matrix(swiss[, -1])
swiss.sam <- sammon(dist(swiss.x))
plot(swiss.sam$points, type = "n")
text(swiss.sam$points, labels = as.character(1:nrow(swiss.x)))
</pre>
<hr><div align="center">[Package <em>MASS</em> version 7.2-44 <a href="00Index.html">Index]</a></div>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -