MDS-class {dimRed} | R Documentation |
An S4 Class implementing classical scaling (MDS).
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.
fun
A function that does the embedding and returns a dimRedResult object.
stdpars
The standard parameters for the function.
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
.
MDS can take the following parameters:
The number of dimensions.
The function to calculate the distance matrix from the input coordinates, defaults to euclidean distances.
Wraps around cmdscale
. The implementation also
provides an out-of-sample extension which is not completely
optimized yet.
Torgerson, W.S., 1952. Multidimensional scaling: I. Theory and method. Psychometrika 17, 401-419. https://doi.org/10.1007/BF02288916
Other dimensionality reduction methods:
AutoEncoder-class
,
DRR-class
,
DiffusionMaps-class
,
DrL-class
,
FastICA-class
,
FruchtermanReingold-class
,
HLLE-class
,
Isomap-class
,
KamadaKawai-class
,
NNMF-class
,
PCA-class
,
PCA_L1-class
,
UMAP-class
,
dimRedMethod-class
,
dimRedMethodList()
,
kPCA-class
,
nMDS-class
,
tSNE-class
## Not run:
dat <- loadDataSet("3D S Curve")
emb <- embed(dat, "MDS")
plot(emb, type = "2vars")
# a "manual" kPCA:
emb2 <- embed(dat, "MDS", d = function(x) exp(stats::dist(x)))
plot(emb2, type = "2vars")
# a "manual", more customizable, and slower Isomap:
emb3 <- embed(dat, "MDS", d = function(x) vegan::isomapdist(vegan::vegdist(x, "manhattan"), k = 20))
plot(emb3)
## End(Not run)