Orthogonal Locality Preserving Projection (OLPP) is a variant of do.lpp
, which
extracts orthogonal basis functions to reconstruct the data in a more intuitive fashion.
It adopts PCA as preprocessing step and uses only one eigenvector at each iteration in that
it might incur warning messages for solving near-singular system of linear equations. Current
implementation may not return an orthogonal projection matrix as of the paper. We plan to
fix this issue in the near future.
an (n×p) matrix or data frame whose rows are observations
an integer-valued target dimension.
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.
either "intersect"
or "union"
is supported. Default is "union"
.
See also aux.graphnbd
for more details.
bandwidth for heat kernel in (0,∞)
a named Rdimtools
S3 object containing
an (n×ndim) matrix whose rows are embedded observations.
a (p×ndim) whose columns are basis for projection.
name of the algorithm.
Cai D, He X, Han J, Zhang H (2006). “Orthogonal Laplacianfaces for Face Recognition.” IEEE Transactions on Image Processing, 15(11), 3608--3614.
if (FALSE) {
## use iris data
data(iris)
set.seed(100)
subid = sample(1:150, 50)
X = as.matrix(iris[subid,1:4])
label = as.factor(iris[subid,5])
## connecting 10% and 25% of data for graph construction each.
output1 <- do.olpp(X,ndim=2,type=c("proportion",0.10))
output2 <- do.olpp(X,ndim=2,type=c("proportion",0.25))
## Visualize
# In theory, it should show two separated groups of data
opar <- par(no.readonly=TRUE)
par(mfrow=c(1,2))
plot(output1$Y, col=label, pch=19, main="OLPP::10% connected")
plot(output2$Y, col=label, pch=19, main="OLPP::25% connected")
par(opar)
}