Learn R Programming

Rdimtools (version 0.1.2)

do.ree: Robust Euclidean Embedding

Description

Robust Euclidean Embedding (REE) is an embedding procedure exploiting robustness of \(\ell_1\) cost function. In our implementation, we adopted a generalized version with weight matrix to be applied as well. Its original paper introduced a subgradient algorithm to overcome memory-intensive nature of original semidefinite programming formulation.

Usage

do.ree(X, ndim = 2, W = NA, preprocess = "null", initc = 1,
  dmethod = c("euclidean", "maximum", "manhattan", "canberra", "binary",
  "minkowski"), maxiter = 100, abstol = 0.001)

Arguments

X

an (n-by-p) matrix or data frame whose rows are observations and columns represent independent variables.

ndim

an integer-valued target dimension.

W

an (n-by-n) weight matrix. Default is uniform weight of 1s.

preprocess

an additional option for preprocessing the data. Default is ``null'' and other methods of ``center'',``decorrelate'', or ``whiten'' are supported. See also aux.preprocess for more details.

initc

initial c value for subgradient iterating stepsize, \(c/\sqrt{i}\).

dmethod

a type of distance measure. See dist for more details.

maxiter

maximum number of iterations for subgradient descent method.

abstol

stopping criterion for subgradient descent method.

Value

a named list containing

Y

an (n-by-ndim) matrix whose rows are embedded observations.

niter

the number of iterations taken til convergence.

trfinfo

a list containing information for out-of-sample prediction.

References

cayton_robust_2006Rdimtools

Examples

Run this code
# NOT RUN {
## generate swiss roll data
X = aux.gensamples(n=123)

## 1. no preprocessing
output1 <- do.ree(X,ndim=2,maxiter=50)

## 2. use decorrelated data
output2 <- do.ree(X,ndim=2,preprocess="decorrelate",maxiter=50)

## Visualize three different projections
par(mfrow=c(1,2))
plot(output1$Y[,1],output1$Y[,2],main="centered")
plot(output2$Y[,1],output2$Y[,2],main="decorrelated")

# }

Run the code above in your browser using DataLab