Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

MDS-class

Metric Dimensional Scaling


Description

An S4 Class implementing classical scaling (MDS).

Details

MDS tries to maintain distances in high- and low-dimensional space, it has the advantage over PCA that arbitrary distance functions can be used, but it is computationally more demanding.

Slots

fun

A function that does the embedding and returns a dimRedResult object.

stdpars

The standard parameters for the function.

General usage

Dimensionality reduction methods are S4 Classes that either be used directly, in which case they have to be initialized and a full list with parameters has to be handed to the @fun() slot, or the method name be passed to the embed function and parameters can be given to the ..., in which case missing parameters will be replaced by the ones in the @stdpars.

Parameters

MDS can take the following parameters:

ndim

The number of dimensions.

d

The function to calculate the distance matrix from the input coordinates, defaults to euclidean distances.

Implementation

Wraps around cmdscale. The implementation also provides an out-of-sample extension which is not completely optimized yet.

References

Torgerson, W.S., 1952. Multidimensional scaling: I. Theory and method. Psychometrika 17, 401-419. https://doi.org/10.1007/BF02288916

See Also

Examples

## Not run: 
dat <- loadDataSet("3D S Curve")

## Use the S4 Class directly:
mds <- MDS()
emb <- mds@fun(dat, mds@stdpars)

## use embed():
emb2 <- embed(dat, "MDS", d = function(x) exp(stats::dist(x)))


plot(emb, type = "2vars")
plot(emb2, type = "2vars")

## End(Not run)

dimRed

A Framework for Dimensionality Reduction

v0.2.3
GPL-3 | file LICENSE
Authors
Guido Kraemer [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.