Description Usage Arguments Value References Examples
Classical multidimensional scaling aims at finding low-dimensional structure by preserving pairwise distances of data.
1 |
data |
an (n\times p) matrix whose rows are observations. |
ndim |
an integer-valued target dimension. |
a named list containing
an (n\times ndim) matrix whose rows are embedded observations.
discrepancy between embedded and origianl data as a measure of error.
torgerson_multidimensional_1952maotai
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## use simple example of iris dataset
data(iris)
idata = as.matrix(iris[,1:4])
icol = as.factor(iris[,5]) # class information
## run Classical MDS
iris.cmds = cmds(idata, ndim=2)
## visualize
opar <- par(no.readonly=TRUE)
plot(iris.cmds$embed, col=icol,
main=paste0("STRESS=",round(iris.cmds$stress,4)))
par(opar)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.