Learn R Programming

Rdimtools (version 1.0.4)

do.mvu: Maximum Variance Unfolding / Semidefinite Embedding

Description

The method of Maximum Variance Unfolding(MVU), also known as Semidefinite Embedding(SDE) is, as its names suggest, to exploit semidefinite programming in performing nonlinear dimensionality reduction by unfolding neighborhood graph constructed in the original high-dimensional space. Its unfolding generates a gram matrix \(K\) in that we can choose from either directly finding embeddings ("spectral") or use again Kernel PCA technique ("kpca") to find low-dimensional representations. Note that since do.mvu depends on Rcsdp, we cannot guarantee its computational efficiency when given a large dataset.

Usage

do.mvu(
  X,
  ndim = 2,
  type = c("proportion", 0.1),
  preprocess = c("null", "center", "scale", "cscale", "decorrelate", "whiten"),
  projtype = c("spectral", "kpca")
)

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.

type

a vector of neighborhood graph construction. Following types are supported; c("knn",k), c("enn",radius), and c("proportion",ratio). Default is c("proportion",0.1), connecting about 1/10 of nearest data points among all data points. See also aux.graphnbd for more details.

preprocess

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

projtype

type of method for projection; either "spectral" or "kpca" used.

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

weinberger_unsupervised_2006Rdimtools

Examples

Run this code
# NOT RUN {
## generate ribbon-shaped data with the small number of data
set.seed(100)
X = aux.gensamples(dname="ribbon", n=25)

## try different connectivity levels
output1 <- do.mvu(X, type=c("proportion", 0.10))
output2 <- do.mvu(X, type=c("proportion", 0.25))
output3 <- do.mvu(X, type=c("proportion", 0.50))

## visualize three different projections
opar <- par(no.readonly=TRUE)
par(mfrow=c(1,3))
plot(output1$Y, main="10% connected")
plot(output2$Y, main="25% connected")
plot(output3$Y, main="50% connected")
par(opar)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab