Learn R Programming

Rdimtools (version 1.0.4)

do.mve: Minimum Volume Embedding

Description

Minimum Volume Embedding (MVE) is a nonlinear dimension reduction algorithm that exploits semidefinite programming (SDP), like MVU/SDE. Whereas MVU aims at stretching through all direction by maximizing \(\sum \lambda_i\), MVE only opts for unrolling the top eigenspectrum and chooses to shrink left-over spectral dimension. For ease of use, unlike kernel PCA, we only made use of Gaussian kernel for MVE. Note that we adopted Rcsdp package in that when given large-scale dataset, it may result in extremely deteriorated computational performance.

Usage

do.mve(
  X,
  ndim = 2,
  knn = ceiling(nrow(X)/10),
  kwidth = 1,
  preprocess = c("null", "center", "scale", "cscale", "whiten", "decorrelate"),
  tol = 1e-04,
  maxiter = 1000
)

Arguments

X

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

ndim

an integer-valued target dimension.

knn

size of \(k\)-nn neighborhood.

kwidth

bandwidth for Gaussian kernel.

preprocess

an additional option for preprocessing the data. Default is "null". See also aux.preprocess for more details.

tol

stopping criterion for incremental change.

maxiter

maximum number of iterations allowed.

Value

a named list containing

Y

an \((n\times ndim)\) matrix whose rows are embedded observations.

trfinfo

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

References

shaw_minimum_2007Rdimtools

See Also

do.mvu

Examples

Run this code
# NOT RUN {
## generate ribbon-shaped data
## in order to pass CRAN pretest, n is set to be small.
set.seed(100)
X = aux.gensamples(dname="ribbon",n=25)

## Compare MVU and MVE
#  Note that MVE actually requires much larger number of iterations
#  Here, due to CRAN limit, it was set as 7.
outMVU5  <- do.mvu(X, ndim=2, type=c("knn",5), projtype="kpca")
outMVE5  <- do.mve(X, ndim=2, knn=5, maxiter=7)

## Visualize two comparisons
opar <- par(no.readonly=TRUE)
par(mfrow=c(1,2))
plot(outMVU5$Y,  main="MVU (k=5)")
plot(outMVE5$Y,  main="MVE (k=5)")
par(opar)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab