Last chance! 50% off unlimited learning
Sale ends in
Locality Pursuit Embedding (LPE) is an unsupervised linear dimension reduction method. It aims at preserving local structure by solving a variational problem that models the local geometrical structure by the Euclidean distances.
do.lpe(
X,
ndim = 2,
preprocess = c("center", "scale", "cscale", "decorrelate", "whiten"),
numk = max(ceiling(nrow(X)/10), 2)
)
an
an integer-valued target dimension.
an additional option for preprocessing the data.
Default is "center". See also aux.preprocess
for more details.
size of
a named list containing
an
a list containing information for out-of-sample prediction.
a
min_locality_2004Rdimtools
# NOT RUN {
## generate swiss roll with auxiliary dimensions
set.seed(100)
n = 100
theta = runif(n)
h = runif(n)
t = (1+2*theta)*(3*pi/2)
X = array(0,c(n,10))
X[,1] = t*cos(t)
X[,2] = 21*h
X[,3] = t*sin(t)
X[,4:10] = matrix(runif(7*n), nrow=n)
## try with different neighborhood sizes
out1 = do.lpe(X, numk=5)
out2 = do.lpe(X, numk=10)
out3 = do.lpe(X, numk=25)
## visualize
opar <- par(no.readonly=TRUE)
par(mfrow=c(1,3))
plot(out1$Y, main="LPE::numk=5")
plot(out2$Y, main="LPE::numk=10")
plot(out3$Y, main="LPE::numk=25")
par(opar)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab