Collaborative Representation-based Projection (CRP) is an unsupervised linear
dimension reduction method. Its embedding is based on
do.crp(X, ndim = 2, preprocess = c("center", "scale", "cscale",
"decorrelate", "whiten"), lambda = 1)
an
an integer-valued target dimension.
an additional option for preprocessing the data.
Default is "center". See also aux.preprocess
for more details.
regularization parameter for constructing
a named list containing
an
a list containing information for out-of-sample prediction.
a
# NOT RUN {
## generate samples
X <- aux.gensamples(n=200)
## test different regularization parameters
out1 <- do.crp(X,ndim=2,lambda=0.1)
out2 <- do.crp(X,ndim=2,lambda=1)
out3 <- do.crp(X,ndim=2,lambda=10)
# visualize
par(mfrow=c(1,3))
plot(out1$Y[,1], out1$Y[,2], main="lambda=0.1")
plot(out2$Y[,1], out2$Y[,2], main="lambda=1")
plot(out3$Y[,1], out3$Y[,2], main="lambda=10")
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab