cmds: cmds computes a smooth embedding in k dimensions

Description Usage Arguments Details Value References Examples

View source: R/cmds.R

Description

For a given set of distance matrices, cmds finds a smooth embedding in k dimensions.

Usage

1
2
cmds(DL, k = 1, l = 0, W = "NULL", v = FALSE, per = FALSE,
  M = "NULL", init = "average", eps = 0.01, group = "NULL")

Arguments

DL

A list of T distance matrices of the same size, where each list item holds the distance matrix of size NxN for one timestep, where N is the size of the underlying dataset. The distance matrices should be positive, symmetric and have zero diagonal.

k

An integer defining the embedding dimension. Defaults to one.

l

The regularization parameter. Should be a positive real number.

W

One of ("NULL", "kamada-kawai", "sammon" or "unfolding") or an optional list of weight matrices. The custom weights must be of the same size as D. It can be used to implement variants of MDS.

v

verbose. If set to TRUE the function outputs information about the convergence during runtime.

per

periodic. If set to TRUE the penalty will be adjusted to enforce periodic embeddings.

M

An optional custom penalty matrix of size TxT.

init

The intialization method. Defaults to average, meaning that the algorithm is initialized with constant curves based on the average distance matrix. An alternative method is random.

eps

The accepted deviation from the previous iteration for convergence checking.

group

A group index vector of length N.

Details

The algorithm is based on multi-dimensional scaling (MDS). It solves multiple MDS problems simultaneously and connects the solutions smoothly via a smoothing penalty. The result is a list of coordinates of a set of N points, such that at each timestep, the euclidean distances between the points are as close as possible to the distances in the distance matrix. The smoothness can be regulated and custom weights for the MDS cost function can be used. cmds provides several MDS variants via the parameter W. W can be set to

Value

res A list with the following elements:

XL

A list of Nxk matrices, whose rows contain the coordinates of the points for a given timestep.

DL

The input list of distance matrices.

XL.init

The initial configuration for the algorithm.

params

A list of parameters used by the algorithm.

con

A list of convergence characteristics

References

Gina Gruenhage & Simon Barthelme, Visualizing the effects of a changing distance using continuous embeddings, http://arxiv.org/abs/1311.1911

Examples

1
2
3
res <- cmds(QuadCurves)
res <- cmds(ExpandingTriangle, k = 2, v = TRUE)
res <- cmds(QuadCurves, l = 10)

ginagruenhage/cmdsr documentation built on May 17, 2019, 4:20 a.m.