sammon(a, p=2, maxit=100, tol=0.05, alpha=0.3, diagnostics=F)
a
| input matrix, coordinate data. No missing values. |
p
| dimensionality of output space. |
tol
| tolerance on error criterion. |
alpha
| step size for gradient descent optimization. |
diagnostics
| whether or not error value is output at each step of the iterative optimization. |
rproj
| matrix of projections of the row observations, as yielded by the nonlinear mapping algorithm. |
J.W. Sammon, A nonlinear mapping for data structure analysis, IEEE Trans. Computers, C-18, 401-409, 1969.
# Assume the 150x4 iris data matrix is in `iris.var'. mds <- sammon(iris.var, tol=0.05, maxit=200) # Now plot observations 1-50, 51-100 and 101-150 distinctively; # add a set of axes through x=0 and y=0. plot(mds$rproj[,1], mds$rproj[,2], type="n", xlab="Axis 1", ylab="Axis 2", main="2-d Sammon mapping of iris data") points(mds$rproj[1:50,1], mds$rproj[1:50,2], pch="*") points(mds$rproj[51:100,1], mds$rproj[51:100,2], pch="+") points(mds$rproj[101:150,1], mds$rproj[101:150,2], pch="o") plaxes(mds$rproj[,1], mds$rproj[,2])