LDAKPC: Linear Fisher discriminant analysis of kernel principal...

Description Usage Arguments Value Author(s) References Examples

View source: R/LDAKPC.R

Description

Linear Fisher discriminant analysis of kernel principal components (DAKPC). This function empolies the LDA and kpca. This function is called Kernel Fisher Discriminant Analysis (KFDA) in other package (kfda). "KFDA" is the misleading name and "KFDA" has crucial error in package kfda. This function rectifies the current existing error for kfda.

Usage

1
2
3
4
LDAKPC(x, y, n.pc, usekernel = FALSE, 
fL = 0, kernel.name = "rbfdot", 
kpar = list(0.001), kernel = "gaussian", 
threshold = 1e-05, ...)

Arguments

x

Input traing data

y

Input labels

n.pc

number of pcs that will be kept in analysis

usekernel

Whether to use kernel function, if TRUE, it will pass to the kernel.names

fL

if using kernel, pass to kernel function

kernel.name

if usekernel is TURE, this will take the kernel name and use the parameters set as you defined

kpar

the list of hyper-parameters (kernel parameters). This is a list which contains the parameters to be used with the kernel function. Valid parameters for existing kernels are :

sigma inverse kernel width for the Radial Basis kernel function "rbfdot" and the Laplacian kernel "laplacedot".

degree, scale, offset for the Polynomial kernel "polydot"

scale, offset for the Hyperbolic tangent kernel function "tanhdot"

sigma, order, degree for the Bessel kernel "besseldot".

sigma, degree for the ANOVA kernel "anovadot".

Hyper-parameters for user defined kernels can be passed through the kpar parameter as well.

kernel

kernel name if all the above are not used

threshold

the threshold for kpc: value of the eigenvalue under which principal components are ignored (only valid when features = 0). (default : 0.0001)

...

additional arguments for the classifier

Value

kpca

Results of kernel principal component analysis. Kernel Principal Components Analysis is a nonlinear form of principal component analysis

kpc

Kernel principal components. The scores of the components

LDAKPC

Linear discriminant anslysis of kernel principal components

LDs

The discriminant function. The scores of the components

label

The corresponding class of the data

n.pc

Number of Pcs kept in analysis

Author(s)

qinxinghu@gmail.com

References

Karatzoglou, A., Smola, A., Hornik, K., & Zeileis, A. (2004). kernlab-an S4 package for kernel methods in R. Journal of statistical software, 11(9), 1-20.

Mika, S., Ratsch, G., Weston, J., Scholkopf, B., & Mullers, K. R. (1999, August). Fisher discriminant analysis with kernels. In Neural networks for signal processing IX: Proceedings of the 1999 IEEE signal processing society workshop (cat. no. 98th8468) (pp. 41-48). Ieee.

Examples

1
2
3
data(iris)
train=LDAKPC(iris[,1:4],y=iris[,5],n.pc=3,kernel.name = "rbfdot")
pred=predict.LDAKPC(train,testData = iris[1:10,1:4])

DA documentation built on July 12, 2021, 9:07 a.m.