qkLLE-class {qkerntool}R Documentation

Class "qkLLE"

Description

The qKernel Locally Linear Embedding class

Objects of class "qkLLE"

Objects can be created by calls of the form new("qkLLE", ...). or by calling the qkLLE function.

Slots

prj:

Object of class "matrix" containing the reduced input data

dims:

Object of class "numeric" containing the dimension of the target space (default 2)

eVal:

Object of class "vector" containing the corresponding eigenvalues

eVec:

Object of class "matrix" containing the corresponding eigenvectors

Methods

prj

signature(object = "qkLLE"): returns the reduced input data

dims

signature(object = "qkLLE"): returns the dimension

eVal

signature(object = "qkLLE"): returns the eigenvalues

eVec

signature(object = "qkLLE"): returns the eigenvectors

xmatrix

signature(object = "qkLLE"): returns the used data matrix

kcall

signature(object = "qkLLE"): returns the performed call

cndkernf

signature(object = "qkLLE"): returns the used kernel function

Author(s)

Yusen Zhang
yusenzhang@126.com

See Also

qkernel-class, cndkernel-class

Examples

  ## S4 method for signature 'matrix'
data(iris)
testset <- sample(1:150,20)
train <- as.matrix(iris[-testset,-5])
labeltrain<- as.integer(iris[-testset,5])
test <- as.matrix(iris[testset,-5])
plot(train ,col=labeltrain, xlab="1st Principal Component",ylab="2nd Principal Component")
# ratibase(c=1,q=0.8)
d_low <- qkLLE(train, kernel = "ratibase", qpar = list(c=1,q=0.8), dims=2, k=5)
#plot the data projection on the components
plot(prj(d_low),col=labeltrain,xlab="1st Principal Component",ylab="2nd Principal Component")

## S4 method for signature 'qkernmatrix'
# ratibase(c=0.1,q=0.8)
qkfunc <- ratibase(c=0.1,q=0.8)
ktrain1 <- qkernmatrix(qkfunc,train)
d_low <- qkLLE(ktrain1, dims = 2, k=5)
#plot the data projection on the components
plot(prj(d_low),col=labeltrain,xlab="1st Principal Component",ylab="2nd Principal Component")
  

[Package qkerntool version 1.19 Index]