Learn R Programming

spe (version 1.1.2)

eval.stress: Evaluates the Sammon stress of an embedding

Description

Given an N dimensional dataset embedded M dimensions, this function will evaluate the Sammon stress of the embedding, via probability sampling

Usage

eval.stress( x, coord,
             ndim = 0, edim = 0, nobs = 0,
             samplesize = 1e6)

Arguments

x
The embedded data in matrix form. If present in a data.frame it will be coerced to a matrix
coord
The input data in matrix form. If present in a data.frame it will be coerced to a matrix
nobs
The number of observations (rows of the input matrix should be the same as the rows of the embedding matrix) If it is not specified nobs will be taken as nrow(coord)
ndim
The number of input dimensions. If not specified it will be taken as ncol(coord)
edim
The number of dimensions to embed in. If not specified it will be taken as ncol(x)
samplesize
The number of iterations for probability sampling. For a dataset of 6070 observations there will be 6070x6069/2 pairwise distances. The default value gives a close approximation and runs fast. If you want a better approximation 1e7 is a good value. YMMV

Value

  • Returns the value of the Sammon stress as a single number

Details

The Sammon stress is given by $$S = \sum_{i < j} \frac{ (d_{ij} - r_{ij} )^2 }{r_{ij}} / \sum_{i

References

Stochastic Proximity Embedding, J. Comput. Chem., 2003, 24, 1215-1221

See Also

spe