| kfda {kfda} | R Documentation |
Kernel Fisher Discriminant Analysis (KFDA)
Description
Train the trainData using KFDA. Basically, we run KFDA using Gaussian kernel. Returns trained KFDA object.
Usage
kfda(trainData = data, kernel.name = "rbfdot", kpar.sigma = 0.001, threshold = 1e-05)
Arguments
trainData |
an optional |
kernel.name |
the kernel function used in training and predicting. This parameter is fixed in the |
kpar.sigma |
hyper-parameter of selected kernel. |
threshold |
the value of the eigenvalue under which principal components are ignored (only valid when features = 0). (default : 1e-05). |
Details
Train the trainData using KFDA. Basically, we run KFDA using Gaussian kernel. Returns trained KFDA object.
Since this function performs KFDA with the appropriate combination of kpca and lda, the following values can show the result of each function.
Value
An object of class kfda.
kpca.train |
An object of class "kpca". It has results of |
lda.rotation.train |
The result of applying LDA, After KPCA is performed on trainData. |
LDs |
A dataframe of linear discriminants of LDA. |
label |
A vector of class label of trainData. |
Note
This package is an early version and will be updated in the future.
Author(s)
Donghwan Kim
ainsuotain@hanmail.net
donhkim9714@korea.ac.kr
dhkim2@bistel.com
References
Yang, J., Jin, Z., Yang, J. Y., Zhang, D., and Frangi, A. F. (2004) <DOI:10.1016/j.patcog.2003.10.015>. Essence of kernel Fisher discriminant: KPCA plus LDA. Pattern Recognition, 37(10): 2097-2100.
See Also
kpca (in package kernlab)
lda (in package MASS)
kfda.predict
Examples
# data input
data(iris)
# data separation
idx <- sample(1:dim(iris)[1], round(dim(iris)[1]*0.7))
trainData <- iris[idx, ]
# training KFDA model
kfda.model <- kfda(trainData = trainData, kernel.name = "rbfdot")
# structure of kfda.model
str(kfda.model)