Learn R Programming

Rdimtools (version 1.0.6)

do.asi: Adaptive Subspace Iteration

Description

Adaptive Subspace Iteration (ASI) iteratively finds the best subspace to perform data clustering. It can be regarded as one of remedies for clustering in high dimensional space. Eigenvectors of a within-cluster scatter matrix are used as basis of projection.

Usage

do.asi(
  X,
  ndim = 2,
  preprocess = c("center", "scale", "cscale", "decorrelate", "whiten"),
  maxiter = 10,
  abstol = 0.001
)

Arguments

X

an \((n\times p)\) matrix or data frame whose rows are observations.

ndim

an integer-valued target dimension.

preprocess

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

maxiter

maximum number of iterations allowed.

abstol

stopping criterion for incremental change in projection matrix.

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.

projection

a \((p\times ndim)\) whose columns are basis for projection.

References

li_document_2004Rdimtools

See Also

do.ldakm

Examples

Run this code
# 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])

## try different tolerance level
out1 = do.asi(X, abstol=1e-2)
out2 = do.asi(X, abstol=1e-3)
out3 = do.asi(X, abstol=1e-4)

## visualize
opar <- par(no.readonly=TRUE)
par(mfrow=c(1,3))
plot(out1$Y, main="ASI::tol=1e-2", pch=19, col=label)
plot(out2$Y, main="ASI::tol=1e-3", pch=19, col=label)
plot(out3$Y, main="ASI::tol=1e-4", pch=19, col=label)
par(opar)

# }

Run the code above in your browser using DataLab