| do.lisomap | R Documentation |
Landmark Isomap is a variant of Isomap in that it first finds a low-dimensional embedding using a small portion of given dataset and graft the others in a manner to preserve as much pairwise distance from all the other data points to landmark points as possible.
do.lisomap(
X,
ndim = 2,
ltype = c("random", "MaxMin"),
npoints = max(nrow(X)/5, ndim + 1),
preprocess = c("center", "scale", "cscale", "decorrelate", "whiten"),
type = c("proportion", 0.1),
symmetric = c("union", "intersect", "asymmetric"),
weight = TRUE
)
X |
an |
ndim |
an integer-valued target dimension. |
ltype |
on how to select landmark points, either |
npoints |
the number of landmark points to be drawn. |
preprocess |
an option for preprocessing the data. Default is "center". See also |
type |
a vector of neighborhood graph construction. Following types are supported;
|
symmetric |
one of |
weight |
|
a named list containing
an (n\times ndim) matrix whose rows are embedded observations.
a list containing information for out-of-sample prediction.
Kisung You
silva_global_2003Rdimtools
do.isomap
## use iris data
data(iris)
X <- as.matrix(iris[,1:4])
lab <- as.factor(iris[,5])
## use different number of data points as landmarks
output1 <- do.lisomap(X, npoints=10, type=c("proportion",0.25))
output2 <- do.lisomap(X, npoints=25, type=c("proportion",0.25))
output3 <- do.lisomap(X, npoints=50, type=c("proportion",0.25))
## visualize three different projections
opar <- par(no.readonly=TRUE)
par(mfrow=c(1,3))
plot(output1$Y, pch=19, col=lab, main="10 landmarks")
plot(output2$Y, pch=19, col=lab, main="25 landmarks")
plot(output3$Y, pch=19, col=lab, main="50 landmarks")
par(opar)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.