do.olpp | R Documentation |
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.
do.olpp( X, ndim = 2, type = c("proportion", 0.1), symmetric = c("union", "intersect"), t = 1 )
X |
an (n\times p) matrix or data frame whose rows are observations |
ndim |
an integer-valued target dimension. |
type |
a vector of neighborhood graph construction. Following types are supported;
|
symmetric |
either |
t |
bandwidth for heat kernel in (0,∞) |
a named Rdimtools
S3 object containing
an (n\times ndim) matrix whose rows are embedded observations.
a (p\times ndim) whose columns are basis for projection.
name of the algorithm.
Kisung You
cai_orthogonal_2006Rdimtools
do.lpp
## Not run: ## 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) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.